How to draw a vertical line with a given height?
50 views (last 30 days)
Show older comments
I use
line([1 1]*posx)
to draw a vertical line in a figure. Can I also draw a vertical line with a specific height?
0 Comments
Accepted Answer
CS Researcher
on 4 May 2016
For a line from (x,y) to (x,y+height), Use this:
line([x x], [y y+height]);
From origin it could just be
line([0 0], [0 height]);
0 Comments
More Answers (0)
See Also
Categories
Find more on Line 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!