voyagerpy.plotting.elbow_plot#
- voyagerpy.plotting.elbow_plot(adata: AnnData, ndims: int = 20, reduction: str = 'pca', ax: Axes | None = None) Axes#
Create an elbow plot for a dimensionality reduction method.
- Parameters:
adata (AnnData) – The annotated data matrix.
ndims (int, optional) – The number of dimensions to show, by default 20
reduction (str, optional) – The name of the dimensionality reduction, by default “pca”. Must exist in
adata.unsand have a"variance_ratio"key. See the output ofscanpy.pp.pca()for more information.ax (Optional[Axes], optional) – The axis to plot on, by default None. If None, create a new figure and axis.
- Returns:
The axis containing the plot.
- Return type:
Axes