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