vline
result = vline(x, [color=])
Input: x, color · Output: result
What it is
Draws a vertical reference line spanning the whole panel at x (number, data units). color= (string, colour, default the theme's rule colour).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = vline(x, [color=]) | x numberDraws a vertical reference line spanning the whole panel at x (number, data units).color string, optionalcolor= (string, colour, default the theme's rule colour). | result — | Returns a handle (see "Handles" above) whose color/width/dash/dot/at properties can be read or reassigned. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
xs = linspace(0, 5, 400)
ys = sin(2 * pi * 1.2 * xs) .* exp(-0.3 * xs)
y_at_3 = sin(2 * pi * 1.2 * 3) * exp(-0.3 * 3)
plot(xs, ys)
vline(3, color="red")
annotate(3, y_at_3, "transient")
zoom_inset(2.8, 3.2, -0.1, 0.1, position="top right", outside=true)
print(y_at_3)
output
· plot: figure 59 (400 points) -0.238976
from plotting