Setting longitude and latitude tick marks on worldmap
13 views (last 30 days)
Show older comments
I am having trouble setting tick marks on worldmap. The code I am using is below and from Matlab help documentation:
ax = worldmap('World');
setm(ax, 'Origin', [0 180 0])
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(ax, land, 'FaceColor', [0.5 0.7 0.5])
lakes = shaperead('worldlakes', 'UseGeoCoords', true);
geoshow(lakes, 'FaceColor', 'blue')
rivers = shaperead('worldrivers', 'UseGeoCoords', true);
geoshow(rivers, 'Color', 'blue')
cities = shaperead('worldcities', 'UseGeoCoords', true);
geoshow(cities, 'Marker', '.', 'Color', 'red')
What I would like to do is set the longitudinal numbers every 90o instead of the default of 45 and the latitudinal numbers every 30o?
1 Comment
Anna S
on 2 Jun 2021
Hei,
I think you are searching for
setm(gca,'MLabelLocation',30)
setm(gca,'PLabelLocation',90)
to change the location of the ticks for meridionals, (M) and parallels parallels (P). This chagnes only the ticks, not the lines, they can be placed by using 'MLineLocation'. You can also set a vector of values, if you want to specify those.
all changeable properties can be found here:
BEst, Anna
Answers (0)
See Also
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!