powered by
Create a box plot with mean overlay using the aelab theme.
plot_box( df, x, y, z = NULL, base_size = 25, line_width = 0.5, outlier_size = 1.5, text_color = "black", facet = FALSE, facet_x = NULL, facet_y = NULL, style = "bw" )
A ggplot object.
ggplot
A data frame.
<[`data-masking`][ggplot2::aes]> Column mapped to the x-axis.
<[`data-masking`][ggplot2::aes]> Column mapped to the y-axis.
<[`data-masking`][ggplot2::aes]> Optional column mapped to fill colour.
Base font size. Default 25.
Box outline width. Default 0.5.
Outlier point size. Default 1.5.
Text colour. Default "black".
"black"
Logical; add facet grid? Default FALSE.
FALSE
Column name (string) for the horizontal facet dimension.
Column name (string) for the vertical facet dimension.
Theme style. Default "bw".
"bw"
if (FALSE) { df <- data.frame(x = rep(c("A","B"), each = 5), y = c(1:5, 3:7)) plot_box(df, x, y) }
Run the code above in your browser using DataLab