Skip to content

Commit c05f751

Browse files
committed
docs: add inline example plot to sc.pl.rank_genes_groups_violin
Part of #1664. Shows violin distribution of top-ranked genes for a selected group on PBMC 68k reduced.
1 parent 1f9b5ca commit c05f751

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/scanpy/plotting/_tools/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,18 @@ def rank_genes_groups_violin( # noqa: PLR0913
11961196
Size of the jitter points.
11971197
{show_save_ax}
11981198
1199+
Examples
1200+
--------
1201+
Plot violin distributions of top-ranked genes per group.
1202+
1203+
.. plot::
1204+
:context: close-figs
1205+
1206+
import scanpy as sc
1207+
adata = sc.datasets.pbmc68k_reduced()
1208+
sc.tl.rank_genes_groups(adata, "bulk_labels")
1209+
sc.pl.rank_genes_groups_violin(adata, groups=["CD34+"], n_genes=5)
1210+
11991211
"""
12001212
if key is None:
12011213
key = "rank_genes_groups"

0 commit comments

Comments
 (0)