필터 지우기
필터 지우기

How to make the axis labels of a plot BOLD

조회 수: 477 (최근 30일)
Shahab Khan
Shahab Khan 2021년 10월 9일
편집: Ryszard Lukaszuk 2022년 4월 26일
I am trying to plot some figures. Generally the axis labels of the figure are in standard size font. Now I know that I can make them bold by going through Edit > Axes Properties. But I would like it to be done within the matlab code.
I am aware of this peice of code, but i am not sure how to implement it into my plotting code.
FontWeight — Character thickness
'normal' (default) | 'bold'
MY general plot code is
figure('Name','Test Figure','NumberTitle', 'off')
hold on;
plot(a, x,'--k','linewidth',2);
plot(b, y , 'b','linewidth',2);
ylabel('percentage')
xlabel('distance')
title('Corelation')
legend('dist','Percentage')

채택된 답변

Star Strider
Star Strider 2021년 10월 9일
The axis lables and titles are text objects.
Try something like this —
x = 1:10;
y = randn(size(x));
figure
plot(x, y)
grid
xlabel('X Label')
ylabel('Y Label', 'FontWeight','bold')
.
  댓글 수: 4
Haseeb Hashim
Haseeb Hashim 2022년 3월 28일
can we make the values of x axis bold ????
Ryszard Lukaszuk
Ryszard Lukaszuk 2022년 4월 26일
편집: Ryszard Lukaszuk 2022년 4월 26일
@Haseeb Hashim xlabel('X Label', 'FontWeight','bold')

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by