How can I create a correct contour plot with contourfm function?

조회 수: 3 (최근 30일)
Szabó-Takács Beáta
Szabó-Takács Beáta 2016년 7월 20일
Dear All, I have a lot of matrices what about I want to create colourfm maps. The values of the matrices varied between 1 and 31. I tried to create a map about one of them which values are: 1,3,4,5,6,11,12,17,18,19,20,21,22,28,29,30 with the following way:
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
caxis([1 31]);
colormap(cmap(1:31,:));
colorbar;
contourfm(latitude,longitude,IU2,31);
I received the Fig 1. It is wrong because it shows the color value 2. Moreover in Scandinavia the value is dominantly 30 instead of 31.
I tried also the
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
caxis([1 31]);
colormap(cmap(1:31,:));
colorbar;
contourfm(latitude,longitude,IU2,30);
but it also shows wrong colour values (Fig 2) moreover the colours does not change between some contour.
Can someone suggest me a correct solution for this issue? Thank you for your help in advance!

답변 (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