Colored lines with different colormap in same axis

1 view (last 30 days)
I am using color_line function which plots a line colored with intensity values according to a colormap. It works by plotting the data with surface and setting CData (below).
This works great for me, but I would now like to include multiple lines in the same axis with different colormaps. I know that having elements with different colormaps is problematic even within the same figure, so I am not sure if there is any workaround within the same axis.
What would be the best way to achieve this? I am using R2013b.
Current color_line does:
h = surface('XData',[x(:) x(:)], 'YData',[y(:) y(:)], 'ZData',zeros(length(x(:)),2), 'CData',[c(:) c(:)], 'FaceColor','none', 'EdgeColor','flat', 'Marker','none');

Accepted Answer

Robin
Robin on 2 Apr 2015
I was able to get this working with freezeColors and cbfreeze from the file exchange.

More Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!