How can I overlay pcolorm figure with contours?

1 vue (au cours des 30 derniers jours)
Szabó-Takács Beáta
Szabó-Takács Beáta le 21 Juil 2016
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!

Réponse acceptée

Szabó-Takács Beáta
Szabó-Takács Beáta le 21 Juil 2016
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);

Plus de réponses (0)

Catégories

En savoir plus sur Geographic Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by