From 0ec5d3e787ac96abb668ed37b325e1fb844b554d Mon Sep 17 00:00:00 2001 From: Marvin Buff Date: Wed, 21 Jan 2026 20:15:46 +0100 Subject: [PATCH] add inline example of pca_variance_ratio --- src/scanpy/plotting/_tools/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/scanpy/plotting/_tools/__init__.py b/src/scanpy/plotting/_tools/__init__.py index eab7908c87..f761be37da 100644 --- a/src/scanpy/plotting/_tools/__init__.py +++ b/src/scanpy/plotting/_tools/__init__.py @@ -206,6 +206,16 @@ def pca_variance_ratio( 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.pl.pca_variance_ratio(adata, n_pcs=50, log=True) + """ ranking( adata,