Multiple colormap not working when using COLORMAP(AX,...)

Hi, when trying to set two colormaps on one image, with the simple example below, the first colormap get overwritten.
figure
ax1 = subplot(2,1,1);
surf(peaks)
colormap(ax1,spring)
ax2 = subplot(2,1,2);
surf(peaks)
colormap(ax2,winter)
matlab R2013a

1 件のコメント

Image Analyst
Image Analyst 2015 年 10 月 8 日
What MATLAB version do you have?

サインインしてコメントする。

 採用された回答

Kelly Kearney
Kelly Kearney 2015 年 10 月 8 日

0 投票

Prior to R2014b, colormaps could only be applied to a figure as a whole, not to individual axes. There are a few workarounds, such as using freezecolors, or adding an offset to the data in one subplot and creating a colormap that includes different colors for the two data ranges.

その他の回答 (0 件)

カテゴリ

質問済み:

2015 年 10 月 8 日

コメント済み:

2015 年 10 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by