MATLAB: How to change the degree symbol in axis tick label while using axesm function

axesmmeridianlabelparallellabel

Hello everyone,
You can see that the degree symbol in axis tick label (see Figure 1) is a bit higher position than normal. I tried to change it perfectly superscript (see Figure 2) taking handle of the function axesm but I can't. I did not find any option in the handle to change it. I used text function instead to prepare Figure 2. It is very time consuming to make degree symbol perfectly superscript using textm function. Some journal ask to make degree symbol perfectly superscript.

Best Answer

If you type something like:
h = get(gca,'children');
>> get(h(2),'string')
You will see that each label has "^" symbol
ans =
60^{\circ} N
So i just deleted that symbol:
h = get(gca,'children');
for i = 1:length(h)
if strcmp(get(h(i),'type'), 'text') % check if object is text
str = get(h(i),'string'); % get string
ix = strfind(str,'^'); % find "^" symbol
str(ix) = []; % delete the symbol
set(h(i),'string',str)
end
end
I have older MATLAB (v2013), maybe code will be a bit different with yours