How to draw a vertical line with a given height?
47 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
CS Researcher
2016-5-4
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!