draw_line | R Documentation |
Provide a sequence of x values and accompanying y values to draw a line on a plot.
draw_line(x, y, ...)
x |
Vector of x coordinates. |
y |
Vector of y coordinates. |
... |
geom_path parameters such as |
This is a convenience function, providing a wrapper around ggplot2's geom_path
.
geom_path
, ggdraw
ggdraw() +
draw_line(
x = c(0.2, 0.7, 0.7, 0.3),
y = c(0.1, 0.3, 0.9, 0.8),
color = "blue", size = 2
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.