Colored lines with different colormap in same axis

1 回表示 (過去 30 日間)
Robin
Robin 2015 年 4 月 1 日
回答済み: Robin 2015 年 4 月 2 日
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');

採用された回答

Robin
Robin 2015 年 4 月 2 日
I was able to get this working with freezeColors and cbfreeze from the file exchange.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by