Something wrong with contourm's fill functionality?

조회 수: 12 (최근 30일)
Vineel
Vineel 2015년 10월 7일
편집: Vineel 2015년 10월 7일
I am trying to plot contours of data on the robinson projection of the globe using R2015b. When I use 'on' for the fill property, the plot looks very bad:
When I don't turn on the fill property, the plot looks okay (the abrupt end of the contour lines at 30 degrees lat is due to only NaN's being present between 30 degrees and -30 degrees lat):
I have attached the datasets I used to produce the plot. Here's my code:
figure
proj = 'robinson';
orig = [0,0];
C = load('coast');
h_axes = axesm('MapProjection',proj,'origin',orig);
set(gcf,'color','w')
framem
[~,h_plot] = contourm(latGrid, lonGrid, data,'Fill','on','LevelList',contourLevels)
Can anyone explain why this happens and possibly a solution to the problem?
By the way, here's what the plot looks like using R2012b:
Thanks
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 10월 7일
The file did not get attached.
Which version of MATLAB are you using? I do not know how contourm is implemented but contour (non-map) has a completely different implementation as of R2014b.
Vineel
Vineel 2015년 10월 7일
Sorry about that. Find it attached now. I am using R2015b.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by