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?

292 ビュー (過去 30 日間)
This is what I'm using:
ylabel('Average Monthly Temperature (^{o}C)','FontSize',14);

採用された回答

Star Strider
Star Strider 2016 年 2 月 29 日
編集済み: Star Strider 2016 年 2 月 29 日
This works:
deg_sign = char(0176)
or you can just enter °.
Another option is:
\circ
  5 件のコメント
Walter Roberson
Walter Roberson 2020 年 7 月 2 日
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 2020 年 7 月 6 日
@Star Strider
\circ
works like charm...
thank you loads

サインインしてコメントする。

その他の回答 (1 件)

keyi Huo
keyi Huo 2019 年 3 月 8 日
char(0176)
  2 件のコメント
Star Strider
Star Strider 2019 年 3 月 8 日
@keyi Huo — Did you not read my Answer (posted and Accepted more than 3 years ago)?

サインインしてコメントする。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by