How to create a custom colormap ("seismic" from python)

61 ビュー (過去 30 日間)
Alfredo Scigliani
Alfredo Scigliani 2023 年 3 月 21 日
編集済み: Alfredo Scigliani 2023 年 3 月 21 日
I have read the colormap helpdocs but I am in need of a bit of help. I am not so familiar with RGB codes for colors, but I am trying to create a colormap like the one attached. It goes from red to white in the middle and then from white to blue towards the bottom end. How can I achieve something like this?
This specific colormap is called "seismic" in python.

採用された回答

KSSV
KSSV 2023 年 3 月 21 日

その他の回答 (1 件)

MJFcoNaN
MJFcoNaN 2023 年 3 月 21 日
Hello,
The easiest way may be creating manually in "colormap editor" and then you can save it.
  1. Right-click the colorbar and select "colormap editor" (I'm not sure the exact English translate).
  2. You can add/delete/change those key-colors, and Matlab will do the interpolation.
  3. You may choose the default "jet" colormap as a template. then delete some unwanted key-colors and add a white key-color in the middle.

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by