Map projection doesn't work in Matlab2015a?

조회 수: 2 (최근 30일)
Madan Kumar
Madan Kumar 2022년 7월 14일
댓글: Madan Kumar 2022년 7월 15일
Hi,
I have lat (37x73), lon(37x73) and a rainfall data(37x73). I plotted the rainfall data (attached) on map with robinson projection. However, it seems there is blanck space (I mean it is not covering the globe completely, see attched plot) although lat(-90 to 90), lon(0 to 360) and corresponding data show global coverage. I really don't know the reason. Am I doing something wrong?? Thank you so much.
my code is below
ann=importdata('rain.txt');
x1=0:5:360;%lon
y1=-90:5:90;%lat
x2=repmat(x1,37,1);
y2=repmat(y1',1,73);
%%if lon>180,west longitude
[ay,ny]=find(x2>180);x2(ay)=x2(ay)-360;
%%%%plot data on globe
landareas = shaperead('landareas.shp','UseGeoCoords',true);
axesm ('robinson', 'Frame', 'on', 'Grid', 'on');set(gca, 'color', 'none');
surfm(y2,x2,ann);geoshow(landareas,'FaceColor','none','EdgeColor',[1 1 1]);
  댓글 수: 1
Madan Kumar
Madan Kumar 2022년 7월 15일
Solved it. longitude -180 was zero (=360-360)when substracting from 360.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Map Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by