Can I have a title over a section of subplots?

1 visualización (últimos 30 días)
Michael Rowlinson
Michael Rowlinson el 11 de Oct. de 2020
Comentada: Image Analyst el 11 de Oct. de 2020
I know about sgtitle and regular titles, I'm just trying to do what's depicted in the diagram I made in paint

Respuestas (1)

Alan Stevens
Alan Stevens el 11 de Oct. de 2020
Editada: Alan Stevens el 11 de Oct. de 2020
Something like this perhaps
x = 0:0.1:6;
y1 = sin(x);
y2 = sin(2*x);
y3 = cos(x);
y4 = cos(2*x);
subplot(2,2,1)
plot(x,y1)
t = axis;
text(t(2),1.2*t(4),'Title1')
subplot(2,2,2)
plot(x,y2)
subplot(2,2,3)
plot(x,y3)
t = axis;
text(t(2),1.2*t(4),'Title2')
subplot(2,2,4)
plot(x,y4)
You will have to adjust the multipliers in the text commands to suit your own plots.
  2 comentarios
Michael Rowlinson
Michael Rowlinson el 11 de Oct. de 2020
It works, but I'll abstain from using it. Thanks
Image Analyst
Image Analyst el 11 de Oct. de 2020
Why? What's wrong with it?

Iniciar sesión para comentar.

Categorías

Más información sobre Title en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by