no degree symbol

350 ビュー (過去 30 日間)
Stephanie
Stephanie 2012 年 6 月 8 日
回答済み: Finlay 2023 年 10 月 27 日
Hi, somehow I cannot display any degree symbols in Matlab. When i put text in a figure title or also the lat/lon labels on maps only show something like a black diamondshaped symbol instead of the º. My colleague, who has the same problem. We use Matlab Version R2012a on Mac OS X Lion.
Thank you in advance!
  3 件のコメント
Stephanie
Stephanie 2012 年 6 月 11 日
No, I haven't touched those.
Yash
Yash 2012 年 11 月 16 日
check prefrences

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

回答 (7 件)

Richard
Richard 2012 年 11 月 16 日
I dont know if this will help but I use ^{o} so for temperature in degrees C I type xlabel('Temperature ^{o}C');
  2 件のコメント
Ana
Ana 2014 年 3 月 12 日
This totally works for labeling axes. Thank you!
Oluwapelumi Ajayi
Oluwapelumi Ajayi 2021 年 4 月 15 日
Just what I needed!

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


Stephanie
Stephanie 2014 年 6 月 1 日
Solved with: feature('DefaultCharacterSet', 'ISO-8859-1');

Thomas
Thomas 2012 年 6 月 11 日
s = sprintf('45%c', char(176));
figure
hold on
title(s)
  5 件のコメント
Stephanie
Stephanie 2012 年 6 月 13 日
I am using R2012a. I have not actively changed anything after installing Matlab, maybe it had the wrong default settings. Can you tell my how to change these font settings?
Stephanie
Stephanie 2012 年 6 月 13 日
I tried to check different char(nr) and found that they actually are correct. char(176) will give me the degree symbol in the workspace, but it cannot be displayed in the command window or in figures...

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


Wayne King
Wayne King 2012 年 6 月 8 日
plot(randn(100,1));
title('360^\circ')
  1 件のコメント
Stephanie
Stephanie 2012 年 6 月 11 日
I have tried this, it also gives the "black diamond".

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


Kimberly
Kimberly 2012 年 6 月 12 日
I have the same problem you are describing, and I am also running Matlab version R2012a on a Mac only I am still using OS X Snow Leopard. I have tried all of the above as well as '^{o}' and have had no luck with any of them.
  1 件のコメント
Stephanie
Stephanie 2012 年 6 月 13 日
I found two more colleagues of mine having that problem, too. But no solution so far.

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


Andrew
Andrew 2012 年 9 月 12 日
Export to eps even when Matlab "fig" shows the black diamond. The eps compiler interprets the TeX code correctly.

Finlay
Finlay 2023 年 10 月 27 日
Sin(30°)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by