Skip to content

Commit ef641ad

Browse files
committed
docs: add inline example plot to sc.pl.rank_genes_groups_stacked_violin
Part of #1664. Converts existing doctest example to a rendered plot showing top marker genes per group on PBMC 68k reduced.
1 parent 1f9b5ca commit ef641ad

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
@@ -985,13 +985,15 @@ def rank_genes_groups_stacked_violin( # noqa: PLR0913
985985
986986
Examples
987987
--------
988-
>>> import scanpy as sc
989-
>>> adata = sc.datasets.pbmc68k_reduced()
990-
>>> sc.tl.rank_genes_groups(adata, "bulk_labels")
988+
Plot top marker genes per group as a stacked violin.
991989
992-
>>> sc.pl.rank_genes_groups_stacked_violin(
993-
... adata, n_genes=4, min_logfoldchange=4, figsize=(8, 6)
994-
... )
990+
.. plot::
991+
:context: close-figs
992+
993+
import scanpy as sc
994+
adata = sc.datasets.pbmc68k_reduced()
995+
sc.tl.rank_genes_groups(adata, "bulk_labels")
996+
sc.pl.rank_genes_groups_stacked_violin(adata, n_genes=4, min_logfoldchange=4, figsize=(8, 6))
995997
996998
"""
997999
return _rank_genes_groups_plot(

0 commit comments

Comments
 (0)