xline
Add one or more vertical lines in the current axes or a specified axes.
Syntax
h = xline(x)
h = xline(..., property, value, ...)
h = xline(hAxes, ...)
Inputs
- x
- Constant point x of vertical line.
- property
- Properties that control the appearance or behavior of the graphics object.
- value
- Value of the properties.
- hAxes
- Axis handle.
Outputs
- h
- Handle of the line graphics object.
Examples
Simple xline example:
clf;
h = xline(4);
Create vertical lines and set properties example:
clf;
x=[0:0.1:3*pi];
plot(x, sin(x));
h = xline([1;9],'color','k','linestyle','--');
Comments
If there is no axis, one will be created first. If x is an Mx1 matrix then M vertical lines will be created.