How do I plot this?

조회 수: 1 (최근 30일)
Chloe Sim
Chloe Sim 2020년 5월 7일
댓글: Chloe Sim 2020년 5월 7일
Hello, I have 3 matrix (Eg: a=[0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;1.0] , b=[0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;0.9;0.9], c=[0.4;0.5;0.6;0.7;0.8;0.9;0.3;0.2;0.1]) that I want to plot. How do I go about and plot this with different color indication for a,b and c (Eg: I want a to be blue, b to be red, and c to be yellow).

채택된 답변

BN
BN 2020년 5월 7일
Try this
plot (a, 'color', 'blue')
hold on
plot(b,'color', 'red')
hold on
plot (c,'color', 'yellow')
hold off
If you want to plot them separately ignore hold on and hold off. You can search for more colors if you need here
  댓글 수: 5
BN
BN 2020년 5월 7일
편집: BN 2020년 5월 7일
Hi Yes you can doing this:
p1 = plot (a, '*', 'color', 'blue')
p1.LineWidth= 10;
Change 10 to 12 to bigger and 10 to 8 to smaller font, for example.
Chloe Sim
Chloe Sim 2020년 5월 7일
Hello! Thank you for helping me! It works very well. Have a good day!

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by