Skip to content

Commit 8535aed

Browse files
docs: add inline example plot to sc.pl.rank_genes_groups_violin (#4058)
1 parent 43f6011 commit 8535aed

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
@@ -1214,6 +1214,18 @@ def rank_genes_groups_violin( # noqa: PLR0913
12141214
Size of the jitter points.
12151215
{show_save_ax}
12161216
1217+
Examples
1218+
--------
1219+
Plot violin distributions of top-ranked genes per group.
1220+
1221+
.. plot::
1222+
:context: close-figs
1223+
1224+
import scanpy as sc
1225+
adata = sc.datasets.pbmc68k_reduced()
1226+
sc.tl.rank_genes_groups(adata, "bulk_labels")
1227+
sc.pl.rank_genes_groups_violin(adata, groups=["CD34+"], n_genes=5)
1228+
12171229
"""
12181230
if key is None:
12191231
key = "rank_genes_groups"

0 commit comments

Comments
 (0)