how to write name on plotted graph?

조회 수: 27 (최근 30일)
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020년 10월 25일
댓글: KSSV 2020년 10월 26일
hi all:
i want to plot these three graphs in matlab such that name of each graph will be on graph like below figure.
p=[123 456 344 333 667 899 565 546 688 998 765 467]
T=[30 45 55 66 77 54 32 34 25 70 12 34]
m=[1.00 2.00 2.50 4.21 3.00 2.32 5.43 6.75 6.57 6.45 7.89 9.80]
figure
plot(p)
hold on
plot(T)
hold on
plot(m)
p=power
T=temperature
m=mass
i want to write name on each graph .
thanks

답변 (1개)

KSSV
KSSV 2020년 10월 25일
Read about legend.
p=[123 456 344 333 667 899 565 546 688 998 765 467]
T=[30 45 55 66 77 54 32 34 25 70 12 34]
m=[1.00 2.00 2.50 4.21 3.00 2.32 5.43 6.75 6.57 6.45 7.89 9.80]
figure
plot(p)
hold on
plot(T)
hold on
plot(m)
legend("Power","Temperature","mass")
  댓글 수: 9
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020년 10월 26일
thanks you so much Image Analyst your method is correct dear i have used your method it is done but one thing that i am confusing that is the postion of name of the graph i mean graph name should come at the top of each graph.
thank you so much
KSSV
KSSV 2020년 10월 26일
You have to read the documentation. You can specify the position like up/ down/ center etc....read the doc.

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

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by