View source: R/geom_violindot.R
geom_violindot | R Documentation |
Create a half-violin half-dot plot, useful for visualising the distribution and the sample size at the same time.
geom_violindot(
mapping = NULL,
data = NULL,
trim = TRUE,
scale = c("area", "count", "width"),
show.legend = NA,
inherit.aes = TRUE,
dots_size = 0.7,
dots_color = NULL,
dots_fill = NULL,
binwidth = 0.05,
position_dots = ggplot2::position_nudge(x = -0.025, y = 0),
...,
size_dots = dots_size,
color_dots = dots_color,
fill_dots = dots_fill
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
trim |
If |
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. |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
binwidth |
When |
position_dots |
Position adjustment for dots, either as a string, or the result of a call to a position adjustment function. |
... |
Other arguments passed on to
|
size_dots , dots_size |
Size adjustment for dots. |
color_dots , dots_color |
Color adjustment for dots. |
fill_dots , dots_fill |
Fill adjustment for dots. |
library(ggplot2)
library(see)
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violindot() +
theme_modern()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.