How do i put a title for my entire subplot?

i have a 3x3 subplot with the first component looking like this:
subplot(3,3,1),plot(AnkleAng_X(:,1:5))
title('Transverse Plane')
ylabel('Ankle Angle(°)')
I want to put a title at the top of the subplot. My code will create 4, 3x3 subplots so i need titles to differentiate each of them.

 採用された回答

Image Analyst
Image Analyst 2014 年 12 月 8 日

1 投票

3 件のコメント

Leelai
Leelai 2014 年 12 月 13 日
works great thanks!
Souarv De
Souarv De 2021 年 2 月 18 日
Awesome. It works.
Image Analyst
Image Analyst 2021 年 2 月 19 日
But that was the 7 year old answer. Now the preferred way is to use sgtitle() like Cris mentioned below, instead of suptitle().

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

その他の回答 (1 件)

Cris LaPierre
Cris LaPierre 2018 年 10 月 25 日

12 投票

There is now (in r2018b) a function in base MATLAB for placing a title over a grid of subplots. It is called sgtitle.

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by