필터 지우기
필터 지우기

I want to set a color map for each subplot.

조회 수: 4 (최근 30일)
poni_poni
poni_poni 2021년 2월 2일
댓글: poni_poni 2021년 2월 2일
Hello ... Thank you for everything.
What I want to do is to separate the color map for each subplot.
For example, I'd really like to have 'jet' for subplot(2,1,1) and 'parula' for subplot(2,1,2).
The graphs are drawn by calling the drownow function, but they are unified to the last set of colormaps.
Is this a problem because I don't understand the specification well?
Can you please tell me how to do this?

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 2일
You have to set the colormap of the axes explicitly:
subplot(1,2,1)
imagesc(peaks(123)) % Something more interesting
axis tight,axis ij
colormap(jet)
subplot(1,2,2)
imagesc
axis tight,axis ij
set(gca,'Colormap',parula)
HTH
  댓글 수: 1
poni_poni
poni_poni 2021년 2월 2일
You allowed me to do what I was looking for!
Thanks for the quick response!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by