hv_line | R Documentation |
Draws horizontal or vertical lines on an existing figure.
hv_line(h = NULL, v = NULL, l = NULL, ...)
h |
A vector with the y-axis positions for horizontal lines. |
v |
A vector with the x-axis positions for vertical lines. |
l |
The lower and upper coordinates to determine
the length of the line (if |
... |
Additional arguments to be
passed to the |
# Create a blank plot
blank_plot()
# Draw horizontal line
hv_line(h = .5, lty = 2)
# Draw vertical line
hv_line(v = .5, lwd = 2)
# Control width of horizontal line
hv_line(h = .25, l = c(.25, .75), col = "blue")
# Control height of vertical line
hv_line(v = .25, l = c(.25, .75), col = "orange")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.