Degree symbol formatting problems
Mostrar comentarios más antiguos
Why does Matlab insert spaces in my axis labels like those in the right-hand plot here? ...

If I use the special character for the degree sign, everything's fine like the left-hand side. And it doesn't seem to matter if I choose 'tex' as my 'Interpreter' option ...
figure(1); clf;
subplot (1,2,1); hold on;
[...]
xlabel ('Longitude [°E]'); ylabel ('Latitude [°N]');
title ('2012'); topbox; axis equal;
axis ([-20.5 -13.5 46 52]); set (gca, 'XTick', -20:2:-14, 'YTick', 46:2:52);
subplot (1,2,2); hold on;
[...]
xlabel ('Longitude [{\circ}E]'); ylabel ('Latitude [{\circ}N]', 'Interpreter', 'tex');
title ('2014'); topbox; axis equal;
axis ([-20.5 -13.5 46 52]); set (gca, 'XTick', -20:2:-14, 'YTick', 46:2:52);
pos = get (gca, 'Position'); cb = colorbar ('horiz'); cbpos = get(cb, 'Position');
cbpos(2) = pos(2) - cbpos(4); set (cb, 'Position', cbpos); set (gca, 'Position', pos);
caxis ([0 12]); set (cb, 'XTick', 0.5:1:11.5, 'XTickLabel', ['J'; 'F'; 'M'; 'A'; 'M'; 'J'; 'J'; 'A'; 'S'; 'O'; 'N'; 'D']);
paper; orient portrait; oname = sprintf('modis_timeseries_v4_0X'); print ('-depsc', '-painters', oname);
I get the same sort of behaviour with Matlab v2020a if I try to use superscript - anomalous spacing in my labels. What am I doing wrong?
I know this sort of question has been asked before, but I'm not finding the solution working for me.
Thanks in advance for any help anyone can offer.
1 comentario
Andrew Yool
el 27 de Nov. de 2020
Respuestas (1)
madhan ravi
el 11 de Sept. de 2020
0 votos
I certainly do not see that behaviour 2020a.
1 comentario
Andrew Yool
el 27 de Nov. de 2020
Categorías
Más información sobre Printing and Saving en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!