📄 vline.m
字号:
function vline(x,lt)
%HLINE Adds a vertical line to current graph at specified location
% The inputs are the location of the line, x and an optional variable
% lt, which specifies the line color and type. The default is a solid
% green line.
% I/O syntax is: vline(x,lt) Note that lt is a text string, e.g.
% enter as: vline(25,'--c') for a dashed cyan line at 25.
z = axis;
i = ishold;
hold on
if nargin == 1
plot([x x],[z(3) z(4)],'-g')
else
plot([x x],[z(3) z(4)],lt)
end
if i == 0
hold off
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -