changing from contour to filled on pcolor plot

조회 수: 4 (최근 30일)
Giulia
Giulia 2023년 5월 4일
답변: Piyush 2023년 5월 18일
Hello :)
How can I add contours (at 0.05, 0.075, 0.1 degrees) instead of filled colours in this pcolor plot?
Thank you in advance!
Code I used for the figure is below
cm1 = brewermap(40,'RdPu');
cm1(cm1>1) = 1;
cm1(cm1<0) = 0;
LONLIMS=[-16 7.8];
LATLIMS=[47 62];
figure
m_proj('miller','lon',LONLIMS,'lat',LATLIMS);
m_pcolor(lont(1:end-1),latt(1:end-1),mean(tdh,3)')
shading flat
caxis([0.05 0.1])
colormap(cm1)
m_grid('fontsize',10);
m_gshhs_f ('patch',[.8 .8 .8],'edgecolor',[.1 .1 .1]);
cb = colorbar;
cb.Label.String = 'Horizontal Temperature gradient (\circC)';

답변 (1개)

Piyush
Piyush 2023년 5월 18일
Refer to the answer given in the following question.
It states how to overlay contour and pcolor.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by