Skip to content

Commit 0ec5d3e

Browse files
committed
add inline example of pca_variance_ratio
1 parent f75575c commit 0ec5d3e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/scanpy/plotting/_tools/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@ def pca_variance_ratio(
206206
A string is appended to the default filename.
207207
Infer the filetype if ending on {`'.pdf'`, `'.png'`, `'.svg'`}.
208208
209+
Examples
210+
--------
211+
212+
.. plot::
213+
:context: close-figs
214+
215+
import scanpy as sc
216+
adata = sc.datasets.pbmc3k_processed()
217+
sc.pl.pca_variance_ratio(adata, n_pcs=50, log=True)
218+
209219
"""
210220
ranking(
211221
adata,

0 commit comments

Comments
 (0)