Set a new colormap

4 次查看(过去 30 天)
Vicky
Vicky 2020-2-11
评论: Vicky 2020-2-11
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
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 个评论
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 个)

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by