stat_qqline | R Documentation |
This stat computes quantiles of the sample and theoretical distribution for the purpose of providing reference lines for QQ-plots.
stat_qqline(
mapping = NULL,
data = NULL,
geom = "line",
position = "identity",
...,
distribution = stats::qnorm,
dparams = list(),
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
mapping |
An aesthetic mapping produced with |
data |
A data frame. |
geom |
A geom. |
position |
A position object. |
... |
Additional arguments |
distribution |
A quantile function. |
dparams |
A list of arguments for |
na.rm |
A logical indicating whether a warning should be issued when missing values are removed before plotting. |
show.legend |
A logical indicating whether legends should be included
for this layer. If |
inherit.aes |
A logical indicating whether aesthetics should be
inherited. When |
data(penguins, package = "palmerpenguins")
ggplot(data = penguins, aes(sample = bill_length_mm)) +
geom_qq() +
stat_qqline(alpha = 0.7, color = "red", linetype = "dashed") +
facet_wrap(~species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.