geom_flat_violin: Half violin plot

View source: R/geom_flat_violin.R

geom_flat_violinR Documentation

Half violin plot

Description

Half violin plot

Usage

geom_flat_violin(
  mapping = NULL,
  data = NULL,
  stat = "ydensity",
  position = "dodge",
  trim = TRUE,
  scale = "area",
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

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

Value

A layer for a ggplot2::ggplot object, similar to e.g. ggplot2::geom_violin.

Source

urlhttps://gist.github.com/dgrtwo/eb7750e74997891d7c20

See Also

ggplot2::geom_violin(), which provided the basis of this function.

Examples

library(ggplot2)
data(diamonds)
ggplot(diamonds, aes(cut, carat)) + geom_flat_violin() + coord_flip()

sdamr documentation built on Nov. 17, 2022, 1:06 a.m.