View source: R/geom-hdr-boxplot.R
geom_hdr_boxplot | R Documentation |
Box plot for the highest density region
geom_hdr_boxplot( mapping = NULL, data = NULL, stat = "hdrcde", position = "dodge2", ..., varwidth = FALSE, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, prob = c(0.5, 0.95, 0.99) )
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
... |
Other arguments passed on to |
varwidth |
width, Default: FALSE |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
prob |
Probability coverage required for HDRs, Default: c(0.5, 0.95, 0.99) |
Calculates and plots the box plot of highest density regions.
A [ggplot2::Geom] representing a highest density region box plot geometry which can be added to a [ggplot()] object.
library(ggplot2) ggplot(faithful, aes(y = eruptions)) + geom_hdr_boxplot() ggplot(faithful, aes(y = eruptions, x= waiting)) + geom_hdr_boxplot(fill="steelblue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.