[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: legends in octave
From: |
Mats Jansson |
Subject: |
Re: legends in octave |
Date: |
11 Sep 2001 11:38:36 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 |
address@hidden writes:
> Hello!
> Is it possible to create graph legends that contains variables?
> For instance something like
>
> for i=1:3
> plot(array1,array2,"-;legend nr;",i)
> endfor
>
> Regards
>
> Johan
Hej Johan!
For example:
octave:1> x = (-10:10)';
octave:2> y = [x.^1, x.^2, x.^3];
octave:3> hold on
octave:4> for n = 1:3,
> plot (x, y(:,n), sprintf ("-;%d;", n))
> endfor
octave:5>
Regards,
--
Mats Jansson <address@hidden> phone (+47) 55 22 52 02
Research and Development fax (+47) 55 22 52 99
Nera Networks AS, P.O.Box 7090, N-5020 Bergen, Norway
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------