필터 지우기
필터 지우기

How to make the font sizes of Xlabel, Ylabel, and Title different in a heat map using MATLAB?

조회 수: 6 (최근 30일)
I have used the heatmap function in MATLAB to draw a figure. However, the font sizes of Xlabel, Ylabel, and Ttile are same. How to make the font sizes of Xlabel, Ylabel, and Title different in a heat map?

채택된 답변

Walter Roberson
Walter Roberson 2024년 7월 19일
h = heatmap(......);
warnstate = warning(MATLAB:structOnObject', 'off');
sh = struct(h);
warning(warnstate);
sh.Axes.XLabel.FontSize = as appropriate;
sh.Axes.YLabel.FontSize = as appropriate;
sh.Axes.Title.FontSize = as appropriate;

추가 답변 (1개)

aasim Azooz
aasim Azooz 2024년 7월 26일
you can do it in two ways
1- from the edit this object properties in the figure tool bar. you click on tthe xlabel or ylabel and change the font size
2- you can do it from within the code using
xlabel ( 'Text .... ','fontsize',14)
ylabel('Test ....',fontsize',16)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by