How to fix overlapping tick labels?
34 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Caleb Rosenberg
el 2 de Sept. de 2022

I am trying to recreate the plot above. Here is what I have:

On the bottom left of my plot -273 and -200 are overlapping. Is it possible to fix it like in the original plot above by moving the just the -273 downwards?
0 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Sept. de 2022
Not easily. You would have to remove -273 from the list of xticks, and then draw a line downwards extending from the y axes (making sure to turn clipping off for it) and text() the -273 into place.
Perhaps it would be acceptable to instead use xtickangle
Más respuestas (1)
dpb
el 2 de Sept. de 2022
Editada: dpb
el 3 de Sept. de 2022
Not so bad, just have to remember the trick, Walter... :)
Once you've got the ticks labeled as you have where you want them, then
xtk=xticklabels;
xtk(1)=strcat('\newline',xtk(1)); % prepend TeX command
xticklabels(xtk)
4 comentarios
Walter Roberson
el 3 de Sept. de 2022
It might be the \ before the number \newline\0 codes \0 which is probably a distinct character.
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


