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?

254 Ansichten (letzte 30 Tage)
This is what I'm using:
ylabel('Average Monthly Temperature (^{o}C)','FontSize',14);

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

keyi Huo
keyi Huo am 8 Mär. 2019
char(0176)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by