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

3 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 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.

Weitere Antworten (0)

Kategorien

Mehr zu Labels and Annotations finden Sie in Help Center und File Exchange

Produkte


Version

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by