Why is my character displayed incorrectly in the text for a figure window on the Mac for MATLAB 6.5 (R13)?

5 views (last 30 days)
Why is my character displayed incorrectly in the text for a figure window on the Mac for MATLAB 6.5 (R13)?
When I type the following at the MATLAB command prompt in MATLAB 6.5(R13) on a Mac:
char(161)
the "degree" symbol is output.
However, if I try to display the "degree" symbol in the text of a figure window, I see an 'i' symbol instead of the "degree" symbol:
figure; text(0.5,0.5,char(161));

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Please note that, as often as possible, you should try to avoid using actual numbers to display special symbols in a figure, because different fonts assign numbers differently.
You can use the '\circ' option in text objects to display the degree symbol.
Alternatively, you can set the FontName property of the text object to a font which contains the desired character.

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!