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?

324 vues (au cours des 30 derniers jours)
This is what I'm using:
ylabel('Average Monthly Temperature (^{o}C)','FontSize',14);

Réponse acceptée

Star Strider
Star Strider le 29 Fév 2016
Modifié(e) : Star Strider le 29 Fév 2016
This works:
deg_sign = char(0176)
or you can just enter °.
Another option is:
\circ
  5 commentaires
Walter Roberson
Walter Roberson le 2 Juil 2020
I wonder if you have accidentally set default Text interpreter to latex ? What shows up if you do
ax = gca; ax.YAxis.TickLabelInterpreter
sai reddy
sai reddy le 6 Juil 2020
@Star Strider
\circ
works like charm...
thank you loads

Connectez-vous pour commenter.

Plus de réponses (1)

keyi Huo
keyi Huo le 8 Mar 2019
char(0176)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by