size of axis numbers
조회 수: 754 (최근 30일)
이전 댓글 표시
Hellho everyone. Do you know how to change the size of axis numbers in a figure in matlab?
댓글 수: 0
답변 (3개)
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
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 Exchange에서 Axes Appearance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!