help-octave
[Top][All Lists]
Advanced

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

Re: plotting a line label from matrix value


From: Paul Kienzle
Subject: Re: plotting a line label from matrix value
Date: Thu, 20 Jul 2000 17:54:49 +0100 (BST)

X=1:10;
Z=[1:10;2:11;3:12];
for i=1:3, 
  plot(X,Z(i,:), sprintf(';%d;',i)); 
  hold on; 
end
hold off;

Paul Kienzle
address@hidden

From: David DS Barnes <address@hidden>
>Teemu Ikonen wrote:
>> 
>> On Mon, 17 Jul 2000, David DS Barnes wrote:
>> 
>> > I have vectors X, Y, and matrix Z
>> > and I want to
>> >
>> >       plot(X,Z(2,:),"<linelabel>")
>> >
>> > where <linelabel> is the value Y(2).
>> 
>> Does this work:
>> 
>> eval(sprintf("plot(X, Z(2,:), ';%d;')", Y(2)));
>> 
>> HTH
>
>it certainly does, thanks,
>BUT I need to plot many lines (ie length of vector)
>and using this in a 
>       for...
>               plot...
>       end; 
>just gives me back a value "1" in the legend...
>
>David
>-- 
>David DS Barnes
>       mechanical eng,imperial college         |       t:0207 594 7181
>       exhibition rd, london, sw7 2bx          |       f:0207 594 7127
>
>
>
>-----------------------------------------------------------------------
>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
>-----------------------------------------------------------------------
>
>
>



-----------------------------------------------------------------------
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]