How to avoid overlapping of the figures and the tiledlayout global title?

56 ビュー (過去 30 日間)
Yang Zhang
Yang Zhang 2023 年 6 月 4 日
回答済み: Piyush 2023 年 6 月 15 日
I could not save the tiledlayout figure directly without zooming to adjust the space beteen global title, xlabel, ylabel title with the subplot title, xlabel, ylabel title.
Could you please help me how to control the space global title, xlabel, ylabel title with the subplot title, xlabel, ylabel title?
Thank you in advance!
urgent!
T.XLabel.String='Wavelength';
T.XLabel.FontSize=14;
T.XLabel.FontWeight="bold";
T.YLabel.String='Wavelength';
T.YLabel.FontSize=14;
T.YLabel.FontWeight="bold";
T.TileSpacing ='compact';
T.Padding ='compact';
T.Title.String=Title{i};
T.Title.FontSize=14;
T.Title.FontWeight='bold';
set(gca,'Position', [0,0,1500,1200])
saveas(gcf,[Title{i},'_TwoWavelength.bmp']
);
  1 件のコメント
Matt J
Matt J 2023 年 6 月 4 日
Your code does not run,
T.XLabel.String='Wavelength';
T.XLabel.FontSize=14;
T.XLabel.FontWeight="bold";
T.YLabel.String='Wavelength';
T.YLabel.FontSize=14;
T.YLabel.FontWeight="bold";
T.TileSpacing ='compact';
T.Padding ='compact';
T.Title.String=Title{i};
Undefined variable 'Title'.
T.Title.FontSize=14;
T.Title.FontWeight='bold';
set(gca,'Position', [0,0,1500,1200])

サインインしてコメントする。

回答 (1 件)

Piyush
Piyush 2023 年 6 月 15 日
Hello,
I understand that you are facing issues in plotting subplots and your titles are getting overlapped. As it is visible, the labels are getting overlapped. One possible solution is to apply a common x-label and y-label for multiple subplots. Refer the following MATLAB answer which tells how to apply common labels for all subplots, which you are also doing-
Also, refer to this documentation to read about tiled layout-

カテゴリ

Help Center および File ExchangeTitle についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by