Learn R Programming

sdamr (version 0.2.0)

geom_flat_violin: 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,
  ...
)

Value

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

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

See Also

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

Examples

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

Run the code above in your browser using DataLab