help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plot Question -- Attach Label / Legend to Series


From: Ben Abbott
Subject: Re: Plot Question -- Attach Label / Legend to Series
Date: Sat, 08 Jan 2011 17:28:21 -0500

On Jan 8, 2011, at 5:18 PM, Jason Criss wrote:

> I plot multiple series on one plot by doing something like this:
> 
> plot(1:n,d2,1:n,d1);
> 
> I would like to label the data series d1 and d2 on the plot so that I can see 
> which lines represent which series.  Anyone know how to do this?  I only see 
> options to label x, y-axis and specific points on the plot.

see ...

        help legend

For your example ...

        plot (1:n, d2, 1:n, d1)
        legend ("location", "northwest", {"label2", "label1"})

Or you can use the inline version ...

        plot (1:n, d2, ";label2;", 1:n, d1, ";label1;")

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]