How can I superimpose data on a map using Mapping Tool box?
Ältere Kommentare anzeigen
When I superimpose a plot over the world map, the map gets distorted. By distorted, I mean that parts of the boarder disappear. This is the code I use:
coast = load('coast');
axesm('pcarree', 'Origin', 180,'MLabelParallel','south');
framem on; gridm on; mlabel on; plabel on; showaxes;
h = geoshow(coast.lat, coast.long,'Color','black');
hold on;
yy = linspace(-pi,pi,NumLong);
xx = linspace(-pi/2, pi/2, NumLat);
[XX, YY] = meshgrid(xx,yy);
surf(YY, XX, data);
1 Kommentar
Nancy
am 20 Jul. 2012
Antworten (1)
Walter Roberson
am 20 Jul. 2012
0 Stimmen
Before you do the surf(), set the axis XLimMode and YLimMode to 'manual'. Otherwise if the surf() wants to expand the xlimit or ylimit, it is not going to take into account the map's existence in figuring out where the bounds should be.
1 Kommentar
Nancy
am 20 Jul. 2012
Kategorien
Mehr zu Geographic Plots finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!