Set default value for axes LabelFontSizeMultiplier

15 次查看(过去 30 天)
Hallo community,
i'm wondering if it's possible to set the default axes lablefontsizemultiplier to 1 instead of default 1.1.
I know that ist possible with following code:
set(gca,'LabelFontSizeMultiplier',1)
here the problem is, I would have to set this property for each new figure induvidual to 1, which is very annoying.
I would prefere to add some line in my figure init script, which sets the default value for all figures to 1. For the title font size multiplier one can use following command:
set(groot,'defaultAxesTitleFontSizeMultiplier',1)
When I search for an identical command for the axes lable font size multiplier via:
get(groot,'default')
there doesn't exist an equivalent command.
Does anyone know an option to set this value initial for all figures?

采纳的回答

Dave B
Dave B 2021-11-20
The pattern is the same, or maybe I misunderstand the question?
When you get defaults from groot, it won't show all defaults available, just the ones that have been set (MATLAB will set a few, and then anything you've overided from the factory settings)
set(groot,'defaultAxesTitleFontSizeMultiplier',1);
set(groot,'defaultAxesLabelFontSizeMultiplier',1);
ax=axes;
[ax.TitleFontSizeMultiplier ax.LabelFontSizeMultiplier]
ans = 1×2
1 1
t=title('a');
x=xlabel('b');
[t.FontSize x.FontSize ax.FontSize]
ans = 1×3
10 10 10

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by