size of axis numbers

1,379 ビュー (過去 30 日間)
Fábio Oliveira
Fábio Oliveira 2021 年 5 月 18 日
Hellho everyone. Do you know how to change the size of axis numbers in a figure in matlab?

回答 (3 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 19 日
ax = gca;
ax.FontSize = 15; % Font Size of 15
  1 件のコメント
JOSE LUIS PEREZ CASTILLO
JOSE LUIS PEREZ CASTILLO 2023 年 1 月 26 日
Thanks, I was looking for this many days.

サインインしてコメントする。


Jan
Jan 2021 年 5 月 18 日
編集済み: Jan 2021 年 5 月 18 日
Do you mean the tick labels?
axes('FontSize', 24, 'NextPlot', 'add');
Without setting the NextPlot property, a plot() command will reset the size - maybe, I cannot try it currently.
  1 件のコメント
Fábio Oliveira
Fábio Oliveira 2021 年 5 月 19 日
Thank you

サインインしてコメントする。


Jonas
Jonas 2021 年 5 月 18 日
if you are talking about the font size of the tick labels have a look into https://de.mathworks.com/matlabcentral/answers/173658-how-can-i-change-the-font-size-of-plot-tick-labels
  2 件のコメント
Fábio Oliveira
Fábio Oliveira 2021 年 5 月 19 日
Thank you
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 1 月 26 日
Here are a couple of different ways to change axis font size.
x = linspace(-2*pi, 2*pi);
y = cos(x);
plot(x,y);
set(gca,'FontSize',20, 'FontName', 'Courier')
xlabel('x(t)') % Font Size and Name are taken from Line 4 command
ylabel('Y', 'FontSize', 15, 'FontName','Garamound', 'FontWeight','bold')
title("Font Size Change")
%% Alternative way:
fontsize(gca, 13, 'points')
fontname(gca, "SansSerif")
%% Alternative Way:
xlabel('x', 'FontName','Garamond', 'FontSize',10)
%% Axis and Font Color change options
ax = gca;
ax.YColor = 'r';
ax.XColor = 'm';

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by