How can I give main title for multi-graphs?

44 ビュー (過去 30 日間)
hgrlk
hgrlk 2021 年 4 月 8 日
コメント済み: hgrlk 2021 年 4 月 8 日
Hello,
I have plot with multi graphs. Each one of them have own titles. But can I give the main title for all of the graphs? I mean each graph will have a separate title, but I want to give a collective name at the top.
Thank you!

採用された回答

VBBV
VBBV 2021 年 4 月 8 日
%if true
sgtitle('your title')
  1 件のコメント
hgrlk
hgrlk 2021 年 4 月 8 日
Thank you!

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

その他の回答 (2 件)

Monika Jaskolka
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')
  1 件のコメント
hgrlk
hgrlk 2021 年 4 月 8 日
Thank you!

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


Adam Danz
Adam Danz 2021 年 4 月 8 日
If you're using tiled layout, assign the title the tiled layout object.
If you're using subplot() to create the axes, use sgtitle as VBBV suggested.
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')
  1 件のコメント
hgrlk
hgrlk 2021 年 4 月 8 日
Thank you!

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

カテゴリ

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