Map projection doesn't work in Matlab2015a?
Afficher commentaires plus anciens
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 commentaire
Madan Kumar
le 15 Juil 2022
Réponses (0)
Catégories
En savoir plus sur 3-D Relief Maps dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!