method_mvnorm | R Documentation |
Function used to specify bivariate normal density estimator
for get_hdr()
and layer functions (e.g. geom_hdr()
).
method_mvnorm()
For more details on the use and implementation of the method_*()
functions,
see vignette("method", "ggdensity")
.
# Normal estimator is useful when an assumption of normality is appropriate set.seed(1) df <- data.frame(x = rnorm(1e3), y = rnorm(1e3)) ggplot(df, aes(x, y)) + geom_hdr(method = method_mvnorm(), xlim = c(-4, 4), ylim = c(-4, 4)) + geom_point(size = 1) # Can also be used with `get_hdr()` for numerical summary of HDRs res <- get_hdr(df, method = method_mvnorm()) str(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.