How to change the colors in the plot?
1.161 views (last 30 days)
Show older comments
%How to change the colors in the plot? %I have four curves, and they are black and blue,
%I'm trying to change the color to make it understandable.
plot(tt,xx(:,1),tt,xx(:,2));
grid on
xlabel('time')
ylabel ('Theta')
hold on
plot(ta,xa(:,1),ta,xa(:,2));
legend('theta(position 1)','thetadot(Velocity 1)','theta(position 2)','thetadot(Velocity 2)');
0 Comments
Accepted Answer
David Sanchez
on 1 Aug 2013
plot(tt,xx(:,1),'b',,tt,xx(:,2),'r'); % one blue and the other red
grid on
xlabel('time')
ylabel ('Theta')
hold on
plot(ta,xa(:,1),'y',ta,xa(:,2),'k'); % one yellow one the other black
legend('theta(position 1)','thetadot(Velocity 1)','theta(position 2)','thetadot(Velocity 2)');
1 Comment
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!