Hello, I want to plot a graph with a title and label on each axis. I use:
figure(1) title('Engine Pressure') xlabel('theta') ylabel('Pressure') plot(theta,P)
when I run the programme the figure appears, but the title and labels don't.
Can anyone help me please? I know I can label them over the graph when it comes up, but I would like to do it automatically each time I run the code.
Thank you very much in advance.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 3월 21일
편집: Azzi Abdelmalek 2014년 3월 21일

0 개 추천

Change the order
figure(1)
plot(theta,P)
title('Engine Pressure')
xlabel('theta')
ylabel('Pressure')

댓글 수: 1

Ana
Ana 2014년 3월 21일
Can't believe that was the problem! Thanks a million!!!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

질문:

Ana
2014년 3월 21일

댓글:

Ana
2014년 3월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by