Colored lines with different colormap in same axis

1 Ansicht (letzte 30 Tage)
Robin
Robin am 1 Apr. 2015
Beantwortet: Robin am 2 Apr. 2015
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');

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by