How can I overlay pcolorm figure with contours?

조회 수: 2 (최근 30일)
Szabó-Takács Beáta
Szabó-Takács Beáta 2016년 7월 21일
답변: Szabó-Takács Beáta 2016년 7월 21일
Dear All, I would like to perform a map froma matrix which values varied between 1 and 31 (e.g 1,3,4,5,6,11,12,13,15,17,18,19,20,21,22,25,26,28,29,30). I tried create a map with contourfm function before by:
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
caxis([1 31]);
contourfm(latitude,longitude,IU2,31);
contourcmap('coeppen1','Colorbar', 'on', 'Location', 'horizontal')
but it does not work properly. I can create a correct map with pcolorm function but I would like to add contours for pcolorm plot. I tried to do it by:
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
caxis([1 31]);
>> colormap(cmap);
pcolorm(latitude,longitude,IU2);
hold all
>> contour(longitude,latitude,IU2);
colorbar;
but the I contours are not presented. Could someone suggest me a solution for this issue? I would appreciate your help!

채택된 답변

Szabó-Takács Beáta
Szabó-Takács Beáta 2016년 7월 21일
Meantime I found a correct solution:
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
caxis([1 31]);
>> colormap(cmap);
pcolorm(latitude,longitude,IU2);
hold on
>> contourm(latitude,longitude,IU2,31,'k', 'LineWidth',0.1);

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by