View source: R/geom_lm_intercept_label.R
geom_lm_intercept_label | R Documentation |
Label ols linear model intercept
geom_lm_intercept_label(
mapping = NULL,
data = NULL,
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string, or the result of
a call to a position adjustment function. Cannot be jointy specified with
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Other arguments passed on to |
library(ggplot2)
ggplot(cars) +
aes(x = speed, y = dist) +
geom_point() +
geom_text(label = "hi", nudge_x = 1) +
geom_lm() +
geom_lm_intercept(color = "blue") +
geom_lm_intercept_label(hjust = 0, digits = 2, nudge_x = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.