add_reference_lines {tidyplots} | R Documentation |
Add reference lines
add_reference_lines(
plot,
x = NULL,
y = NULL,
linetype = "dashed",
linewidth = 0.25,
...
)
plot |
A |
x |
Numeric values where the reference lines should meet the x axis. For example, |
y |
Numeric values where the reference lines should meet the y axis. For example, |
linetype |
Either an integer (0-6) or a name (0 = blank, 1 = solid, 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash). |
linewidth |
Thickness of the line in points (pt). Typical values range between |
... |
Arguments passed on to the |
A tidyplot
object.
animals %>%
tidyplot(x = weight, y = speed) %>%
add_reference_lines(x = 4000, y = c(100, 200)) %>%
add_data_points()
animals %>%
tidyplot(x = weight, y = speed) %>%
add_reference_lines(x = 4000, y = c(100, 200), linetype = "dotdash") %>%
add_data_points()