Re: Automatically Change Line Color in 2D plot for a series of Lines



In article <g4bgih$55p$1@xxxxxxxxxxxxxxxxxx>,
Nicholas <szrama@xxxxxxxx> wrote:

I am having trouble figuring out how to automatically change
the line color in a 2D figure made by the plot command
without having to manually edit each line color with the
Property Editor.

set() the 'Color' property of the line or lineseries object.


I have a .fig 2D plot that I saved with maybe 50-60 lines.
But, each line is the same color. I would like to have each
line follow the colormap hsv if possible to get a rainbow
like appearance for the lines.

lines = find(figurenumber,'Type','line');
numlines = length(lines);
for K=1:numlines
set(lines, 'Color', hsv2rgb([K/numlines, .8, .8]));
end
--
"And that's the way it is." -- Walter Cronkite
.