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.

 Respuesta aceptada

Image Analyst
Image Analyst el 8 de Dic. de 2014

1 voto

3 comentarios

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

Iniciar sesión para comentar.

Más respuestas (1)

Cris LaPierre
Cris LaPierre el 25 de Oct. de 2018

12 votos

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

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Preguntada:

el 8 de Dic. de 2014

Comentada:

el 19 de Feb. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by