Does the latest version of Matlab allow more than one colormaps in one plot?

1 回表示 (過去 30 日間)
Leon
Leon 2021 年 11 月 2 日
コメント済み: Leon 2021 年 11 月 3 日
In the past, overlaying two axes was the only option, but overlaying can often causes its own problems, e.g., slight offset, etc.
Does anyone know if Matlab has fixed the issue?
Many thanks.
  3 件のコメント
Walter Roberson
Walter Roberson 2021 年 11 月 3 日
freezeColors() from the FIle Exchange can be very useful.
Leon
Leon 2021 年 11 月 3 日
Many thanks for the recommendation. I'll check out freezeColors().

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

採用された回答

Image Analyst
Image Analyst 2021 年 11 月 3 日
編集済み: Image Analyst 2021 年 11 月 3 日
Nothing to fix. You can have only one colormap per axes control, but you can get around that by having basically two colormaps stacked on top of each other and adjust your data. For example if you have data that goes from 0 to 1023 (like a uint16 image) and want one colormap for gray levels 0-511 (say gray) and another (say, hsv) from 512 to 2013, you can do
cmap = [gray(512); hsv(512)]
imshow(yourImage, 'Colormap', cmap);

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by