malariagen_data.af1.Af1.plot_pca_variance#

Af1.plot_pca_variance(evr: ndarray, width: int | None = 900, height: int | None = 400, show: bool = True, renderer: str | None = None, **kwargs) Figure | None#

Plot explained variance ratios from a principal components analysis (PCA) using a plotly bar plot.

Parameters#

evrndarray

An array of explained variance ratios, one per component.

widthint or None, optional, default: 900

Plot width in pixels (px).

heightint or None, optional, default: 400

Plot height in pixels (px).

showbool, optional, default: True

If true, show the plot. If False, do not show the plot, but return the figure.

rendererstr or None, optional

The name of the renderer to use.

**kwargs

Passed through to px.bar().

Returns#

Figure or None

A plotly figure (only returned if show=False).