hline | R Documentation |
These functions are used to draw horizontal or vertical lines on an existing plot.
hline(x, lower, upper, label, at, ...)
vline(x, lower, upper, label, at, ...)
x |
A numeric vector. |
lower |
A vector which defines the line(s)' lower plot range. |
upper |
A vector which defines the line(s)' upper plot range. |
label |
Line label(s). |
at |
Numeric value(s) specifying where along the line the labels are to be displayed. |
... |
Arguments passed onto |
hline()
: Draw horizontal lines.
vline()
: Draw vertical lines.
plot(c(0, 10), c(0, 10), type = "n")
hline(0, col = "red", lty = "solid")
vline(9, col = "red", lty = "dashed")
vline(1:5, col = "black", lty = "solid", lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.