Adding a line to a plot without normalized coordinates
Show older comments
I am creating a scatter plot and I would like to add a line to the plot based on a y value. The y axis is not fixed and the line is specific to a value. How do I add a line to the plot?
example plot: scatter([0 10 20 30 40],[3 5 3 2 9]);
something like: line([0 40],[15 15], 'Color','r')
where line would go across the whole plot at 15 on the y and be red in color
Accepted Answer
More Answers (1)
Chmical
on 11 Mar 2013
0 votes
Categories
Find more on Scatter 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!