How do I add a title to each subplot?
이전 댓글 표시
I have the following codes
delta=[-2*pi:0.063:2*pi];
y=sin(delta);
subplot(3,2,1)
plot(y)
y=cos(delta);
subplot(3,2,2)
plot(y)
title(sin(delta))
My question is how do i put the title for each graph and labels? i tried to to do title(sin(delta)) but it doesn't show
채택된 답변
추가 답변 (2개)
Chad Greene
2016년 4월 28일
3 개 추천
For subplots I often prefer to use ntitle rather than title. The difference is ntitle keeps the text closer to the data, whereas title places the text high above the axes, where it may appear to be an xlabel for to the plot above.
Azzi Abdelmalek
2013년 3월 13일
title('sin(delta)')
댓글 수: 2
Shakir Hussain
2019년 3월 29일
Great Azzi
You are always providing short,simple and effective solution
thankyou for your effort
Chad Greene
2019년 4월 5일
Or this, which is shorter, simpler, and just as effective :-)
title sin(delta)
카테고리
도움말 센터 및 File Exchange에서 Axes Appearance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!