Show lat lon ticks with Mapping toolbox and pcolorm
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I show the lat lon ticks around a pcolorm map using the Mapping toolbox?
Here is how I define my axis :
axesm('MapProjection','eqdcylin','Origin',[Grd_xlat1 Grd_xlon1 90-az],'FLonLimit',[lon1 lon2],'FLatLimit',[lat2 lat1],'frame','on','FlineWidth',2,'FFill',400,'grid','on','MeridianLabel','off','ParallelLabel','off','MLabelParallel','south','Aspect','normal')
I tried to switch MeridianLabel and ParallelLabel to on, but it doesn't change anything.
Thank you.
0 commentaires
Réponses (1)
Cam Salzberger
le 12 Déc 2017
Hello Frank,
-Cam
5 commentaires
Cam Salzberger
le 12 Déc 2017
I did some experimentation with some example data:
figure
axesm('MapProjection','eqdcylin','Origin',[40 125 90-30],'FLonLimit',[115 135],'FLatLimit',[30 45],'grid','on')
load topo
[lat lon] = meshgrat(topo,topolegend,[90 180]);
pcolorm(lat,lon,topo)
demcmap(topo)
tightmap
setm(gca,'MeridianLabel','on','ParallelLabel','on','MLineLocation',5,'PLineLocation',5,'MLabelLocation',5,'PLabelLocation',5)
If you remove the 'Origin' specification in the map axes, the labels show. If you experiment with large origin values on larger maps:
figure('Color','white')
load topo
axesm('miller','Origin',[90 45 30])
axis off; framem on; gridm on;
[lat lon] = meshgrat(topo,topolegend,[90 180]);
pcolorm(lat,lon,topo)
demcmap(topo)
tightmap
setm(gca,'MeridianLabel','on','ParallelLabel','on','MLineLocation',5,'PLineLocation',5,'MLabelLocation',5,'PLabelLocation',5)
you can see that it warps where the labels will show up on the map. I believe that is what is happening here, and the labels are simply outside the frame. I'd suggest playing around with map limits to see where the labels end up on your map, and modifying settings until you can get them where you want them.
-Cam
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!