Skip to content

Commit 8e4ee64

Browse files
Ekin-Kahramanmeeseeksmachine
authored andcommitted
Backport PR scverse#4058: docs: add inline example plot to sc.pl.rank_genes_groups_violin
1 parent ca8f391 commit 8e4ee64

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
@@ -1273,6 +1273,18 @@ def rank_genes_groups_violin( # noqa: PLR0913
12731273
Size of the jitter points.
12741274
{show_save_ax}
12751275
1276+
Examples
1277+
--------
1278+
Plot violin distributions of top-ranked genes per group.
1279+
1280+
.. plot::
1281+
:context: close-figs
1282+
1283+
import scanpy as sc
1284+
adata = sc.datasets.pbmc68k_reduced()
1285+
sc.tl.rank_genes_groups(adata, "bulk_labels")
1286+
sc.pl.rank_genes_groups_violin(adata, groups=["CD34+"], n_genes=5)
1287+
12761288
"""
12771289
if key is None:
12781290
key = "rank_genes_groups"

0 commit comments

Comments
 (0)