필터 지우기
필터 지우기

Set default value for axes LabelFontSizeMultiplier

조회 수: 10 (최근 30일)
JohannesR
JohannesR 2021년 11월 20일
댓글: JohannesR 2021년 11월 21일
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
  댓글 수: 1
JohannesR
JohannesR 2021년 11월 21일
I see, I made a bad mistake in the command.
Thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (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