geom_normal_dist | R Documentation |
Fits normal distribution based on standard deviation
geom_normal_dist(
mapping = NULL,
data = NULL,
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
outline.type = "upper",
...
)
... |
library(ggplot2)
ggplot(faithful, aes(x = waiting)) +
geom_rug() +
geom_histogram(aes(y = ..density..)) +
geom_normal_dist(fill = "magenta") +
facet_wrap(facets = vars( eruptions > 3 ), ncol = 1) +
geom_normal_dist(q_min = .99)
ggplot(faithful, aes(x = waiting)) +
geom_density() +
geom_normal_dist(q_min = .05, q_max = 1-.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.