How can I modify the size of label in boxplot?
조회 수: 9 (최근 30일)
이전 댓글 표시
I created a boxplot with by the following function:
h= boxplot([tas_O2,tas_DeQM,tas_KeQM,tas_Dv,tas_Kv],'labels',{'Obs','M1_e','M2_e','M1_v','M2_v'});
I would like to change the original size of the labels. Could someone write me what I should to do?
댓글 수: 0
답변 (1개)
Meet
2024년 8월 1일
Hi Szabó,
You can modify the size of the labels in a boxplot by adjusting the 'axes' properties and setting the corresponding font size for the 'XAxis' and 'YAxis' labels.
For Example:
h = boxplot([tas_O2, tas_DeQM, tas_KeQM, tas_Dv, tas_Kv], 'labels', {'Obs', 'M1_e', 'M2_e', 'M1_v', 'M2_v'});
% Get the current axes
ax = gca;
% Set the font size for the x-axis labels
ax.XAxis.FontSize = 12;
% Set the font size for the y-axis labels
ax.YAxis.FontSize = 12;
For more information, you can refer to the following documentation link:
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!