How can I overlay pcolorm figure with contours?

1 visualización (últimos 30 días)
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!

Respuesta aceptada

Szabó-Takács Beáta
Szabó-Takács Beáta el 21 de Jul. de 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);

Más respuestas (0)

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by