Why can't I edit y label and x labels in matlab subplot figures (.FIG)
15 ビュー (過去 30 日間)
古いコメントを表示
I have a 3 x 2 subplots (tiledlayout) with a common Y label and X label. I want to edit the labels and change the font and fontsize size but I'm unable to edit it.
The subplots axis labels were controlled by
tle = tiledlayout(3,2,"TileSpacing","compact");
tle.XLabel.String = 'Time';
tle.YLabel.String = 'Temp';
So its a single Y and X labels for the plots.this was done sometime ago and I need to edit the figs to change the fonts and fontsize. The problem does not affect figures with only one plot except for the subplots and tiledlayout figures.
0 件のコメント
採用された回答
Star Strider
2023 年 9 月 21 日
I’m not certain what the problem is.
You can get the handles to each subplot with:
Axsp = subplot(3,2,4); % Fourth Subplot Axes
for that particular subplot.
You then have access to that subplot’s properties:
Axsp.XLabel = 'NewLabel'
Axsp.XLabel.FontSize = 12;
Example —
figure
subplot(3,2,4)
plot((0:0.1:2*pi), sin((0:0.1:2*pi)))
xlabel('Time (s)')
ylabel('Velocity (cm/s)')
Then later —
Axsp = subplot(3,2,4); % Fourth Subplot Axes
Axsp.XLabel.FontSize = 12;
.
4 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!