How can I overlay pcolorm figure with contours?

2 次查看(过去 30 天)
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
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 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by