Set default value for axes LabelFontSizeMultiplier

12 vues (au cours des 30 derniers jours)
JohannesR
JohannesR le 20 Nov 2021
Commenté : JohannesR le 21 Nov 2021
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?

Réponse acceptée

Dave B
Dave B le 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
  1 commentaire
JohannesR
JohannesR le 21 Nov 2021
I see, I made a bad mistake in the command.
Thank you very much.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by