Colored lines with different colormap in same axis

1 visualizzazione (ultimi 30 giorni)
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');

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by