How can I create a correct contour plot with contourfm function?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!