I am trying to display the degree symbol ° in the Y-axis on a plot using Matlab 2015a. But it is not working, does anyone know why?

290 visualizaciones (últimos 30 días)
This is what I'm using:
ylabel('Average Monthly Temperature (^{o}C)','FontSize',14);

Respuesta aceptada

Star Strider
Star Strider el 29 de Feb. de 2016
Editada: Star Strider el 29 de Feb. de 2016
This works:
deg_sign = char(0176)
or you can just enter °.
Another option is:
\circ
  5 comentarios
Walter Roberson
Walter Roberson el 2 de Jul. de 2020
I wonder if you have accidentally set default Text interpreter to latex ? What shows up if you do
ax = gca; ax.YAxis.TickLabelInterpreter

Iniciar sesión para comentar.

Más respuestas (1)

keyi Huo
keyi Huo el 8 de Mzo. de 2019
char(0176)

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by