Skip to content

Commit 063262b

Browse files
docs: add inline example plot to sc.pl.rank_genes_groups_stacked_violin (#4057)
1 parent 2721b60 commit 063262b

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/scanpy/plotting/_tools/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,13 +1003,15 @@ def rank_genes_groups_stacked_violin( # noqa: PLR0913
10031003
10041004
Examples
10051005
--------
1006-
>>> import scanpy as sc
1007-
>>> adata = sc.datasets.pbmc68k_reduced()
1008-
>>> sc.tl.rank_genes_groups(adata, "bulk_labels")
1006+
Plot top marker genes per group as a stacked violin.
10091007
1010-
>>> sc.pl.rank_genes_groups_stacked_violin(
1011-
... adata, n_genes=4, min_logfoldchange=4, figsize=(8, 6)
1012-
... )
1008+
.. plot::
1009+
:context: close-figs
1010+
1011+
import scanpy as sc
1012+
adata = sc.datasets.pbmc68k_reduced()
1013+
sc.tl.rank_genes_groups(adata, "bulk_labels")
1014+
sc.pl.rank_genes_groups_stacked_violin(adata, n_genes=4, min_logfoldchange=4, figsize=(8, 6))
10131015
10141016
"""
10151017
return _rank_genes_groups_plot(

0 commit comments

Comments
 (0)