Skip to content

Commit d348605

Browse files
Backport PR #4025 on branch 1.12.x (docs(plotting): add inline plot example for highest_expr_genes) (#4035)
Co-authored-by: haoyu-haoyu <85037553+haoyu-haoyu@users.noreply.github.com>
1 parent 7e53cc6 commit d348605

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/scanpy/plotting/_qc.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ def highest_expr_genes(
7070
-------
7171
If `show==False` a :class:`~matplotlib.axes.Axes`.
7272
73+
Examples
74+
--------
75+
.. plot::
76+
:context: close-figs
77+
78+
import scanpy as sc
79+
adata = sc.datasets.pbmc3k()
80+
sc.pl.highest_expr_genes(adata)
81+
82+
Show only the top 10 genes
83+
84+
.. plot::
85+
:context: close-figs
86+
87+
sc.pl.highest_expr_genes(adata, n_top=10)
88+
7389
"""
7490
import seaborn as sns # Slow import, only import if called
7591

0 commit comments

Comments
 (0)