How can I give main title for multi-graphs?
42 次查看(过去 30 天)
显示 更早的评论
采纳的回答
更多回答(2 个)
Monika Jaskolka
2021-4-8
编辑:Monika Jaskolka
2021-4-8
figure;
plot(rand(5,1));
annotation('textbox', [0.45, 0.5, 0.5, 0.5], 'String', 'Global Title', ...
'FontSize', 14, 'FontWeight', 'bold', 'LineStyle', 'none')
More information on textboxes: https://www.mathworks.com/help/matlab/ref/matlab.graphics.shape.textbox-properties.html
Adam Danz
2021-4-8
If you're using tiled layout, assign the title the tiled layout object.
Demo:
fig = figure();
tlo = tiledlayout(fig, 2, 2);
ax1 = nexttile; title(ax1, 'title 1')
ax2 = nexttile; title(ax2, 'title 2')
ax3 = nexttile; title(ax3, 'title 3')
ax4 = nexttile; title(ax4, 'title 4')
title(tlo, 'Master title')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!