add_violin | R Documentation |
Add violin plot
add_violin(
plot,
dodge_width = NULL,
alpha = 0.3,
saturation = 1,
trim = FALSE,
linewidth = 0.25,
scale = "width",
...
)
plot |
A |
dodge_width |
For adjusting the distance between grouped objects. Defaults
to |
alpha |
A |
saturation |
A |
trim |
If |
linewidth |
Thickness of the line in points (pt). Typical values range between |
scale |
if "area" (default), all violins have the same area (before trimming the tails). If "count", areas are scaled proportionally to the number of observations. If "width", all violins have the same maximum width. |
... |
Arguments passed on to the |
A tidyplot
object.
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_violin()
# Changing arguments:
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_violin(saturation = 0.6)
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_violin(draw_quantiles = c(0.25, 0.5, 0.75))
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_violin(trim = TRUE)
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_violin(linewidth = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.