We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca8f391 commit f39ea76Copy full SHA for f39ea76
src/scanpy/plotting/_tools/__init__.py
@@ -206,6 +206,24 @@ def pca_variance_ratio(
206
A string is appended to the default filename.
207
Infer the filetype if ending on {`'.pdf'`, `'.png'`, `'.svg'`}.
208
209
+ Examples
210
+ --------
211
+ Plot the variance ratio for the first 30 PCs.
212
+
213
+ .. plot::
214
+ :context: close-figs
215
216
+ import scanpy as sc
217
+ adata = sc.datasets.pbmc3k_processed()
218
+ sc.pl.pca_variance_ratio(adata)
219
220
+ Plot on a logarithmic scale.
221
222
223
224
225
+ sc.pl.pca_variance_ratio(adata, log=True)
226
227
"""
228
ranking(
229
adata,
0 commit comments