How to set the defaultAxesFontSize for a Shared Axes Label
10 ビュー (過去 30 日間)
古いコメントを表示
I can set the defaultAxesFontsize for my plots as:
set(groot,'defaultAxesFontSize' ,18);
This works for me in normal plots.
But this does not seem to affect the AxesFontSize if I use a tiled chart with a Shared Axes Label
t = tiledlayout(2,2,'TileSpacing','Compact');
xlabel(t,'Distance (mm)')
% Tile 1
nexttile
plot(rand(1,20))
title('Sample 1')
% Tile 2
nexttile
plot(rand(1,20))
title('Sample 2')
0 件のコメント
回答 (1 件)
Rijuta
2023 年 9 月 13 日
Hi Hans,
I understand that you want to set the axes font size for a Shared Axes Label.
In your code, the `set(groot,'defaultAxesFontSize', 18)` command sets the default font size for axes in normal plots. However, it does not affect the font size of axes in tiled charts with shared axes labels.
To change the font size in this case, you can use the `AX` output argument of the `nexttile` function to access the axes object and modify its properties.
Kindly refer to the documentation to know more about setting the axes properties: https://www.mathworks.com/help/matlab/ref/nexttile.html - mw_182f5fd9-00a6-42df-b2d3-9f874f0bb759
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!