scPyviewer.plot_stacked_violin#
- scPyviewer.plot_stacked_violin(ds, genes, group=None, figsize=None, dpi=150, swap_axes=False, palette=None, inner='box', linewidth=0.6, title=None, title_fontsize=11, xlabel=None, ylabel=None, xlabel_fontsize=9, ylabel_fontsize=9, tick_fontsize=7, gene_label_fontsize=8, rotation=30, font_family=None)[source]#
Stacked violin plots: one violin per gene, grouped by a metadata column.
Better than
sc.pl.stacked_violin: directfigsize/dpi, full font control, andswap_axesto orient genes horizontally.- Parameters:
group (str, optional) –
obsgrouping column.figsize (tuple, optional) – Figure
(width, height)in inches. Auto if None.dpi (int) – Resolution.
swap_axes (bool) – If True, genes on X-axis, groups on Y-axis.
palette (dict, optional) –
{label: color}override.inner ({None, "box", "point"}) – Inner marks inside each violin body.
linewidth (float) – Violin body edge linewidth.
title (str, optional) – Figure title.
title_fontsize (float) – Title font size.
ylabel (str | None) – Shared axis label overrides.
ylabel_fontsize (float) – Shared axis label font sizes.
tick_fontsize (float) – Tick-label font size.
gene_label_fontsize (float) – Gene name label font size.
rotation (int) – Group-label rotation in degrees (non-swapped mode).
font_family (str, optional) – Font family for this figure only.
ds (Dataset)
xlabel (str | None)
ylabel
xlabel_fontsize (float)
ylabel_fontsize