Set default value for axes LabelFontSizeMultiplier

12 visualizaciones (últimos 30 días)
JohannesR
JohannesR el 20 de Nov. de 2021
Comentada: JohannesR el 21 de Nov. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by