help-octave
[Top][All Lists]
Advanced

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

RE: different colours for different curves in the same plot


From: Federica
Subject: RE: different colours for different curves in the same plot
Date: Tue, 31 May 2011 09:44:56 -0700 (PDT)

Thank you William!!! 

So if I understand well, I need to define the color property for each line.

I followed your suggestion but I had no results.... an empty plot and all
the m values displayed.

The command 

for m=1:length(ydata_sets) 

refers to the range of values for m, is it right? 

m values are between 0 and 1 so it becomes:

% start pseudo-code
plotColors = colormap;
figure
for m = 1:length(1)
   plotColorsI = round( size( plotColors, 1)* m / length(1) );
   hold on   
   plot(t,m);
   H1 = plot(t, m)
   hold off
   set( H1,'Color', plotColors( plotColorsI,:) );
end
% end pseudo-code

And the result is an empty plot!!! What I did wrong??

maybe I need to define the number of lines? 

Thank you again,

Federica



--
View this message in context: 
http://octave.1599824.n4.nabble.com/different-colours-for-different-curves-in-the-same-plot-tp3563544p3563643.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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