How can I change color of a straight line based on a numeric value ?
Show older comments
Hello Matlabers!! I need to plot n straight lines for which I will be getting data from a .csv file. The data will be x1, y1, x2, y2, ppm. where ppm is the a measure of something. I need to plot all lines in a single plot with the color of the lines based on ppm value.
Can you help me with this ?
I appreciate your time...
Thanks
Answers (1)
Walter Roberson
on 5 Mar 2013
Edited: Walter Roberson
on 5 Mar 2013
0 votes
2 Comments
Jujhar Khurana
on 6 Mar 2013
Walter Roberson
on 6 Mar 2013
If you want to color individual points and not draw any connecting line, then use scatter() instead of plot()
Categories
Find more on 2-D and 3-D Plots 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!