How to change the colorbar max and min number and correspond a certain color to the colormap ticks

4 ビュー (過去 30 日間)
My data's max and min are 0.09 and 0. I want to
  1. set the colorbar max and min value to 1 and -1 and
  2. have green and red corresponds to the max and min values.
The colorbar ticks can be an interpolation from green to red with black at the middle.
Clim does not work because the green color corresponds to the data's maximum instead of the colorbar limit's maximum.
Please help...

採用された回答

Umang Pandey
Umang Pandey 2024 年 8 月 18 日
Hi Kedi,
You can refer to the following MATLAB answer that answers a similar question:
Best,
Umang

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by