子图:标题长度大小和主标题

发布于 2025-01-05 11:45:03 字数 508 浏览 2 评论 0原文

在此处输入图像描述

基于上述子图:

1)我希望能够在顶部位置有一个主标题它代表所有子图的标题。

2)我想增加每个子图标题的长度,使得标题的长度可以像X方向上的图形长度一样延伸。

关于该图:我在运行 3 次的循环中使用这个标题:

CO2_label={'Normal CO2','CO2 with 0.1% NPs','CO2 with 0.5% NPs','CO2 with 1% NPs';'-b','-r','-g','-k'};

for i=1:3
    .
    .
    .
    title(['Area where saturation due to ',CO2_label(1,4),' > saturation due to ',CO2_label(1,i)],'Fontweight','Bold')

end

enter image description here

Based on the above subplot:

1) I want to be able to have one main title at the top position which represents the title of all the subplots.

2) I would like to increase the length of the title of each subplot such that the length of the title can be extended as the length of the figure in X-direction.

About the figure: I am using this title within the loop which runs 3 times:

CO2_label={'Normal CO2','CO2 with 0.1% NPs','CO2 with 0.5% NPs','CO2 with 1% NPs';'-b','-r','-g','-k'};

for i=1:3
    .
    .
    .
    title(['Area where saturation due to ',CO2_label(1,4),' > saturation due to ',CO2_label(1,i)],'Fontweight','Bold')

end

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦醒时光 2025-01-12 11:45:03

1) SUPLABEL 是可用于主标题的文件交换提交。您还可以为一组子图应用 x 和 y 标签。

2)在标题调用中使用大括号来获取字符串,而不是单元格:

title(['Area where saturation due to ',CO2_label{1,4},...
       ' > saturation due to ',CO2_label{1,i}],'Fontweight','Bold')

1) SUPLABEL is the File Exchange submission you can use for the main title. You can also apply x and y labels for a group of subplots.

2) use curly brackets in title call to get strings, not cells:

title(['Area where saturation due to ',CO2_label{1,4},...
       ' > saturation due to ',CO2_label{1,i}],'Fontweight','Bold')
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文