Plot persistent vertical and horizontal line

版本 1.0.0.0 (2.5 KB) 作者: Luca Amerio
Draws a horizontal or vertical line that persists through pans and zooms
82.0 次下载
更新时间 2016/1/27

查看许可证

VHLINE Draws a horizontal or vertical line that persists through pans and zooms.
VHLINE('x',val) draws a vertical line on the current axes that intersect the x axis at the location specified by 'val'.
VHLINE('y',val) draws a horizontal line on the current axes that intersect the y axis at the location specified by 'val'.

VHLINE(_,linetype) defines the aspect of the line. All the usual
specifications used for the "plot" functions are valid, including key-value pairs

H = VHLINE(_) returns the handle for the line

Example
vhline('x',10)
vhline('y',1,'r--')
vhline('x',5,'Color',[.7 .7 .7],'Linetype',':')

The HandleVisibility property of the line object is set to "off", so not only does it not appear on
legends, but it is not findable by using findobj. Specifying an output argument causes the function to
return a handle to the line, so it can be manipulated or deleted. Also, the HandleVisibility can be
overridden by setting the root's ShowHiddenHandles property to on.

The Tag property of the line is used by the function to maintain the
line visible. Modify of overwrite it will cause this behavior to stop.
Any Tag specified by key-value par is overwritten.

The ActionPostCallback properties of the Pan and Zoom tools of the
current figures get modified by this function.

by Luca Amerio
luca.amerio@polimi.it
27/01/2016

引用格式

Luca Amerio (2024). Plot persistent vertical and horizontal line (https://www.mathworks.com/matlabcentral/fileexchange/55116-plot-persistent-vertical-and-horizontal-line), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2015b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0