View source: R/visualization.R
| plot_box | R Documentation |
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"
)
df |
A data frame. |
x |
<['data-masking'][ggplot2::aes]> Column mapped to the x-axis. |
y |
<['data-masking'][ggplot2::aes]> Column mapped to the y-axis. |
z |
<['data-masking'][ggplot2::aes]> Optional column mapped to fill colour. |
base_size |
Base font size. Default 25. |
line_width |
Box outline width. Default 0.5. |
outlier_size |
Outlier point size. Default 1.5. |
text_color |
Text colour. Default |
facet |
Logical; add facet grid? Default |
facet_x |
Column name (string) for the horizontal facet dimension. |
facet_y |
Column name (string) for the vertical facet dimension. |
style |
Theme style. Default |
A ggplot object.
## Not run:
df <- data.frame(x = rep(c("A","B"), each = 5), y = c(1:5, 3:7))
plot_box(df, x, y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.