How to plot single colorful line?
Show older comments
Iam trying to plot a single line graph varaying colororder depending on the intensity increse.
x=[1 2 3 4 5 6 ];
y=[1 2 3 4 5 6 ];
plot(x,y), colororder(jet)
expecting to color change over line. Thank you.
Accepted Answer
More Answers (1)
This can't be done with a single line object. It can be done with multiple line objects or with patch objects. This thread has examples of both.
Categories
Find more on Color and Styling 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!