no degree symbol

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 Commenti

Sean de Wolski
Sean de Wolski il 8 Giu 2012
Have you changed your font preferences (outside of ML)?
Stephanie
Stephanie il 11 Giu 2012
No, I haven't touched those.
Yash
Yash il 16 Nov 2012
check prefrences

Accedi per commentare.

Risposte (7)

Richard
Richard il 16 Nov 2012

9 voti

I dont know if this will help but I use ^{o} so for temperature in degrees C I type xlabel('Temperature ^{o}C');

2 Commenti

Ana
Ana il 12 Mar 2014
This totally works for labeling axes. Thank you!
Oluwapelumi Ajayi
Oluwapelumi Ajayi il 15 Apr 2021
Just what I needed!

Accedi per commentare.

Stephanie
Stephanie il 1 Giu 2014

3 voti

Solved with: feature('DefaultCharacterSet', 'ISO-8859-1');
Thomas
Thomas il 11 Giu 2012

1 voto

s = sprintf('45%c', char(176));
figure
hold on
title(s)

5 Commenti

Stephanie
Stephanie il 11 Giu 2012
This will give me the title 45, no symbol at all.
Thomas
Thomas il 11 Giu 2012
then you have changed the font settings.. char(176) is the degree symbol in MATLAB..
Thomas
Thomas il 11 Giu 2012
What version of MATLAB are you using?
Stephanie
Stephanie il 13 Giu 2012
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 il 13 Giu 2012
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...

Accedi per commentare.

Wayne King
Wayne King il 8 Giu 2012

0 voti

plot(randn(100,1));
title('360^\circ')

1 Commento

Stephanie
Stephanie il 11 Giu 2012
I have tried this, it also gives the "black diamond".

Accedi per commentare.

Kimberly
Kimberly il 12 Giu 2012

0 voti

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 Commento

Stephanie
Stephanie il 13 Giu 2012
I found two more colleagues of mine having that problem, too. But no solution so far.

Accedi per commentare.

Andrew
Andrew il 12 Set 2012

0 voti

Export to eps even when Matlab "fig" shows the black diamond. The eps compiler interprets the TeX code correctly.

Tag

Richiesto:

il 8 Giu 2012

Risposto:

il 27 Ott 2023

Community Treasure Hunt

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

Start Hunting!

Translated by