Can I have a title over a section of subplots?

조회 수: 1 (최근 30일)
Michael Rowlinson
Michael Rowlinson 2020년 10월 11일
댓글: Image Analyst 2020년 10월 11일
I know about sgtitle and regular titles, I'm just trying to do what's depicted in the diagram I made in paint

답변 (1개)

Alan Stevens
Alan Stevens 2020년 10월 11일
편집: Alan Stevens 2020년 10월 11일
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
Michael Rowlinson
Michael Rowlinson 2020년 10월 11일
It works, but I'll abstain from using it. Thanks
Image Analyst
Image Analyst 2020년 10월 11일
Why? What's wrong with it?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by