Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/scanpy/plotting/_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ def highly_variable_genes( # noqa: PLR0912
A string is appended to the default filename.
Infer the filetype if ending on {{`'.pdf'`, `'.png'`, `'.svg'`}}.

Examples
--------
.. plot::
:context: close-figs

import scanpy as sc
adata = sc.datasets.pbmc3k_processed()
sc.pp.highly_variable_genes(adata)
sc.pl.highly_variable_genes(adata)

Plot on log axes

.. plot::
:context: close-figs

sc.pl.highly_variable_genes(adata, log=True)

"""
if isinstance(adata_or_result, AnnData):
result = adata_or_result.var
Expand Down
16 changes: 16 additions & 0 deletions src/scanpy/plotting/_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ def highest_expr_genes(
-------
If `show==False` a :class:`~matplotlib.axes.Axes`.
Examples
--------
.. plot::
:context: close-figs
import scanpy as sc
adata = sc.datasets.pbmc3k_processed()
sc.pl.highest_expr_genes(adata)
Show only the top 10 genes
.. plot::
:context: close-figs
sc.pl.highest_expr_genes(adata, n_top=10)
"""
import seaborn as sns # Slow import, only import if called

Expand Down
Loading