plot title and label

2 次查看(过去 30 天)
Ana
Ana 2014-3-21
评论: Ana 2014-3-21
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by