Plots the vector Y versus vector X using conditional coloring based on colormaps.
The condition vector C is independent of the values of X and Y but must be the same size.
The colormap MAP can either be a Matlab or a userdefined colormap.
x = linspace(0,4*pi,50);
y = sin(x);
c = y.^2;
map = colormap(jet);
h = ccplot(x,y,c,map);
minor issue, either the >= or <= on line 32 must have the = removed to avoid omitting segments with endpoints on colormap transition points. See the segment between the 6th and 7th points in the example plot
Thanks. It would be nice however to allow multiple line plotting such as: ccplot(1:10,rand(200,10),c,map)
* Fixed minor error in example