View source: R/geom_flat_violin.R
geom_flat_violin | R Documentation |
Half violin plot
geom_flat_violin( mapping = NULL, data = NULL, stat = "ydensity", position = "dodge", trim = TRUE, scale = "area", show.legend = NA, inherit.aes = TRUE, ... )
mapping |
The mapping |
data |
data.frame |
stat |
statistic (don't change) |
position |
position dodge |
trim |
Logical |
scale |
Scale (don't change) |
show.legend |
Logical |
inherit.aes |
Logical |
... |
other arguments |
A layer for a ggplot2::ggplot
object, similar to e.g. ggplot2::geom_violin
.
urlhttps://gist.github.com/dgrtwo/eb7750e74997891d7c20
ggplot2::geom_violin()
, which provided the basis of this function.
library(ggplot2) data(diamonds) ggplot(diamonds, aes(cut, carat)) + geom_flat_violin() + coord_flip()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.