For example, a plot a normal density over a histogram of conditional weighted residuals.

add_density(fun = dnorm, col = .ggblue, lwd = 1.5, lty = 2, ...)

layer_dnorm(x, sd = 1, mean = 0, ...)

Arguments

fun

passed to ggplot2::stat_function

col

passed to ggplot2::stat_function

lwd

passed to ggplot2::stat_function

lty

passed to ggplot2::stat_function

...

passed to ggplot2::stat_function

x

a ggplot object to which the density line will be added

sd

passed to stats::dnorm

mean

passed to stats::dnorm