View source: R/geom_text_leverage.R
| geom_text_leverage | R Documentation | 
Returns a scatter plot with points that are labeled
geom_text_leverage(
  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)
a scatter plot with points that are labeled
library(ggplot2)
library(magrittr)
cars %>%
ggplot(aes(x = speed, y = dist)) +
geom_point() +
geom_lm() +
geom_text_leverage(check_overlap = TRUE,
digits = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.