Move mlabel positions off axis

Technical Source
2 min readFeb 15, 2022

--

I have this really nice map, but I need to change two things. 1. The longitude labels are on the axis. Does anyone know how to move the labels off of the axis? 2. The latitude labels are fine, except they are not uniform. How can I change the 75 to an 80?

Here is my code.

load coastlines
figure('Color','w')%Colors the figure white.
axesm('stereo','Origin',[-90 0],'MapLatLimit',[-90 -50]);
axis off;
framem on;
gridm on;
mlabel on;
plabel on;
setm(gca,'MLabelParallel',10)
geoshow(coastlat,coastlon,'DisplayType','polygon', 'FaceColor', 'white');

I tried this to get the latitude limits, but nothing changed.

axesm('stereo','Origin',[-90 0],'MapLatLimit',[-90 -50],'FLatLimit',[-90 -60]);

I then tried this, but the 75 was still there, and 45 degrees showed up. It also made Antarctica look too small. So, I tried 60 degrees as my limit, but 75 was still there.

axesm('stereo','Origin',[-90 0],'MapLatLimit',[-90 -40]);
axesm('stereo','Origin',[-90 0],'MapLatLimit',[-90 -60]);

I figured out how to move the labels manually in figure properties, but there must be a way to move things around within the code.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

setm(gca,'plabellocation',10,'labelrotation','on')

The ‘plabellocation’ is poorly named, but it means the spacing of latitudes (p for parallels). The 10 value for ‘plabellocation’ places lines every 10 degrees latitude. The ‘mlabelrotation’ rotates the labels around the circle to keep them from conflicting with the outside of the axis.

A note: the default coastline in Matlab is not really a coast line, and it’s also not really a grounding line. Take a look at the Ross Ice Shelf, where the coastlat and coastlon appear to follow the grounding line, but on the Filchner Ronne Ice Shelf it follows the edge of the ice. Amery and George VI are also a bit wonky. You can simply type

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet