Set default value for axes LabelFontSizeMultiplier

13 views (last 30 days)
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?

Accepted Answer

Dave B
Dave B on 20 Nov 2021
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

More Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!