help-octave
[Top][All Lists]
Advanced

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

WG: plotting legend labels for each curve


From: John W. Eaton
Subject: WG: plotting legend labels for each curve
Date: Thu, 30 Mar 2000 03:00:26 -0600 (CST)

On 30-Mar-2000, Matz Katja (K5/ESK5) <address@hidden> wrote:

| Hi,
| 
| is there also a way to do something programmable for labels like for
| functions, like this:
| 
| > gset xrange [0:10]; gset yrange [-2:2]; z=(0:0.1:10)';
| data=[z,sin(z),cos(z)]; label=[";sin;",";cos;"]; for i=1:2
| plot(z,data(:,1+i),label(:,i)) endfor;

Try

  hold on
  axis ([0, 10, -2, 2]);
  z = (0:0.1:10)';
  data = [z, sin(z), cos(z)];
  label = [";sin;"; ";cos;"];
  for i = 1:2
    plot (z, data(:,1+i), label(i,:))
  endfor

jwe



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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