Skip to contents

Builds a stacked vertical layout of per-feature violin plots using Seurat::VlnPlot, assembled with patchwork. X-axis labels and ticks are hidden on all panels except the bottom one; the gene name is shown as the y-axis title (rotated 0\(^\circ\)) on each panel.

Usage

StackedVlnPlot(
  seurat_object,
  features,
  pt.size = 0,
  plot.margin = grid::unit(c(-0.75, 0, -0.75, 0), "cm"),
  ...
)

Arguments

seurat_object

A Seurat object.

features

Character vector of features (genes) to plot. One panel per feature.

pt.size

Jitter point size (default 0 - no points).

plot.margin

Plot margin around each panel as a grid::unit object (default unit(c(-0.75, 0, -0.75, 0), "cm")). Negative top/bottom values collapse space between stacked panels.

...

Additional arguments forwarded to Seurat::VlnPlot (e.g. group.by, split.by, cols).

Value

A patchwork object (one panel per feature, stacked in a single column).