help-octave
[Top][All Lists]
Advanced

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

Re: Hold all


From: Moo
Subject: Re: Hold all
Date: Tue, 6 Jul 2010 11:12:00 +0200

If I understand you correctly, you can do this by saving predefined colors in a cell array, e.g.,

E=cell(4,1);
E{1} = 'r';
E{2} = 'g';
E{3} = 'b';
E{4] = 'k';

hold on; figure;
for i=1:4
plot(X{i},Y{i},E{i})    % remember that E{i} is a string that specifies the color for the plot.
end

That's assuming that your multiple x and y data are also saved in cell arrays; you can modify that to whatever you need.  If you want to have colors outside the predefined ones, or don't want to bother with specifying the colors exactly, I'm sure you could do something with generating random colors using RGB format.  I'm not sure of the specifics, but I'm sure it can be done.

On Sat, Jul 3, 2010 at 3:33 PM, lovecraft22 <address@hidden> wrote:

How would you do that say on a for cycle?
--
View this message in context: http://octave.1599824.n4.nabble.com/Hold-all-tp2277011p2277236.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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