Half violin plot
urlhttps://gist.github.com/dgrtwo/eb7750e74997891d7c20
geom_flat_violin( mapping = NULL, data = NULL, stat = "ydensity", position = "dodge", trim = TRUE, scale = "area", show.legend = NA, inherit.aes = TRUE, ... )
mapping
: The mappingdata
: data.framestat
: statistic (don't change)position
: position dodgetrim
: Logicalscale
: Scale (don't change)show.legend
: Logicalinherit.aes
: Logical...
: other argumentsA layer for a ggplot2::ggplot
object, similar to e.g. ggplot2::geom_violin
.
library(ggplot2) data(diamonds) ggplot(diamonds, aes(cut, carat)) + geom_flat_violin() + coord_flip()
ggplot2::geom_violin()
, which provided the basis of this function.