geom_split_violin: Split violin plot using ggplot2

View source: R/plot_functions.R

geom_split_violinR Documentation

Split violin plot using ggplot2

Description

Draws split violin plot using ggplot2. Credit to jan-glx (https://stackoverflow.com/questions/35717353/split-violin-plot-with-ggplot2)

Usage

geom_split_violin(
  mapping = NULL,
  data = NULL,
  stat = "ydensity",
  position = "identity",
  ...,
  draw_quantiles = NULL,
  trim = TRUE,
  scale = "area",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

Arguments

mapping

ggplot mapping

data

data.frame

stat

ggplot identity

position

ggplot position

...

additional parameters to pass to layer()

draw_quantiles

draw quantiles. Default is NULL

trim

Trim data. Default is True.

scale

Default is area.

na.rm

Default is na.rm

show.legend

Default is NA

inherent.aes

Default is TRUE

Value

ggplot object

Examples


# split violin plot
ggplot(my_data, aes(x, y, fill = m)) + geom_split_violin()



NMikolajewicz/scMiko documentation built on June 28, 2023, 1:41 p.m.