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

3 ビュー (過去 30 日間)
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.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

製品


リリース

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by