Why am I unable to change the font size or rotate a label in MATLAB whose "FontName" property is set to "FixedWidth"?

6 views (last 30 days)
To view this behavior, enter the following command:
ylabel('mytext', 'FontName', 'FixedWidth', 'FontSize', '16')
You can observe that the y label is horizontal (when usually vertical), and the font size is less that 16.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This enhancement has been made for Release 14 SP1 (R14SP1). For previous product releases, read below for any possible workarounds:
The default fixed-width font is "Courier". This font is a bitmap that cannot be rotated or resized. To workaround this issue, set the default fixed-width font of the root object to be "Courier New" using:
set(0, 'FixedWidthFontName', 'Courier New');
Note that if you had initially executed the command:
ylabel('mytext', 'FontName', 'FixedWidth', 'FontSize', '16')
then "Courier" will be cached as the fixed-width font. Therefore, setting the default value of the root object will not affect the font.
To avoid this, it is best to place the above SET command within your startup.m file so that "Courier New" is the default fixed width font everytime you start MATLAB.

More Answers (0)

Categories

Find more on Labels and Annotations in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!