Hi, I would like to set a new colormap for my trisurf from the cmocean collection. Does anyone know how to set one of them? Thank you.

 採用された回答

jessupj
jessupj 2020 年 2 月 11 日
編集済み: jessupj 2020 年 2 月 11 日

1 投票

It should be as easy as calling something like
cmap = cmocean('thermal'); % or 'deep', or whichever colormap from the collection you want.
cmocean maps are great, but may not be appreciated by reviewers

3 件のコメント

Vicky
Vicky 2020 年 2 月 11 日
Thank you for the reply. Unfortunately, I've tried this already, but getting error. I was wondering if there anything else I should define first. Does it work in your code?
jessupj
jessupj 2020 年 2 月 11 日
編集済み: jessupj 2020 年 2 月 11 日
what is the error it's giving you? are you sure that the cmocean.m is on your path? you also have to set the figure colormap to the one defined by the cmap command. E.g:
cmap = cmocean('thermal');
pcolor( randn(10) );
colorbar;
colormap(cmap);
Vicky
Vicky 2020 年 2 月 11 日
Thanks so much! It works now! :)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeColor and Styling についてさらに検索

質問済み:

2020 年 2 月 11 日

コメント済み:

2020 年 2 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by