MATLAB Answers

How to remove latitude and longitude axes from a map in mapping toolbox?

9 views (last 30 days)
Kamila Turczewski
Kamila Turczewski on 30 Sep 2019
Answered: Shashwat Bajpai on 3 Oct 2019
How do you remove the axes for the latitude and longitude for a map in MatLab? I have been using the mapping toolbox, but when I look online for ways to remove the axes none of them work with my map.
Here is what I have been using to make my map:
latlim = [25 50]; lonlim = [-105 -67];
axe = usamap(latlim, lonlim);
sheds = shaperead('usastatehi','UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(axe, sheds, 'FaceColor', [1 1 1])
axesm('FontColor', 'white')
scatterm(lat, long, 20, trend, 'filled')
I have tried to use axesm() and showaxes(), but neither have worked to remove the axes from my figure.

  0 Comments

Sign in to comment.

Answers (1)

Shashwat Bajpai
Shashwat Bajpai on 3 Oct 2019
I understand you want to remove the latitude and longitude axes from the map. I am unsure whether you want to remove the labels too or not.
At the end of the code you can add:
gridm off
to remove just the latitude and longitude lines.
If the requirement is to remove both the lines and the labels you can add:
mlabel off; plabel off; gridm off
Hope this helps!

  0 Comments

Sign in to comment.

Sign in to answer this question.