is there a way to use interpolated coloring for 2D-line plotting?
For instance
plot(linedata,'r')
plots a red line.
What I'm looking for is something like
plot(linedata,'from dark red to blue')?
to get the line colored like a rainbow?
Thanks for possible suggestions
Uwe Sydow (sy...@uni-bremen.de)
I rember answering a similar question a while ago... You could try using
a patch object:
x = [1 2 3 4 5 6];
y = [2 1 4 3 8 4];
d = [10 12 -3 44 35 0];
p = patch([x nan],[y nan], [d nan], 'EdgeColor', 'interp');
% nans added so face will not close
Hope this helps,
Jonathan Zarge
j...@mathworks.com
The MathWorks, Inc.
24 Prime Park Way
Natick, MA 01760
http://www.mathworks.com