Set a new colormap

조회 수: 7 (최근 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에서 Blue에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by