help-octave
[Top][All Lists]
Advanced

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

Re: set(h,'color',[1,0,0 ; 0,1,0 ; 0,0,0]) or set(h,'color',mat2cell(ra


From: bpabbott
Subject: Re: set(h,'color',[1,0,0 ; 0,1,0 ; 0,0,0]) or set(h,'color',mat2cell(rainbow(3))) ??
Date: Wed, 17 Nov 2010 16:03:31 +0000 (GMT)

On Nov 17, 2010, at 09:13 AM, kloof <address@hidden> wrote:


Dear all,

when I plot 3 lines using 1 plot command, I get 3 different colors.

I would like to plot 200 lines and have the colors set to the matrix
kolor=rainbow(200).

'plot' doesn't accept this, but it does let me fetch the colors (as they are
automatically assigned).

h=plot(x200lines, y200lines);
dd=get(h,'color');

dd is now a cell.
I can change some values in this cell, but I cannot feed dd back into the
plot
set(h,'color',dd)

it says:

error: invalid value for color property "color"

Is there no other way than looping through line-by-line?

many thanks, Kloof
 
Try setting the colororder for the axis before plotting.

set (gca, "colororder", rainbow(200))
h = plot (x200lines, y200lines)

Ben



reply via email to

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