voyagerpy.plotting.plot_pca#
- voyagerpy.plotting.plot_pca(adata: AnnData, ndim: int = 5, cmap: str | None = None, color_by: str = 'cluster', obsm='X_pca', legend_kwargs: Dict[str, Any] | None = None, subplot_kwargs: Dict[str, Any] | None = None, **kwargs) ndarray[Any, dtype[Axes]]#
Create a PCA plot of the fist
ndimdimensions.Each component is plotted againts the other components. The plots on the diagonals represent the density of the points. The color of each point is determined by the
color_byparameter.- Parameters:
adata (AnnData) – The annotated data matrix.
ndim (int, optional) – The number of components to plot, by default 5
cmap (Optional[str], optional) – The colormap to use, by default None
color_by (str, optional) – The column name in
adata.obsto color the points by, by default “cluster”obsm (str, optional) – The obsm to use for plotting the dimension, by default “X_pca”
legend_kwargs (Optional[Dict[str, Any]], optional) – The keywords to use for the legend, by default None
subplot_kwargs (Optional[Dict[str, Any]], optional) – The keywords to use for
subplots_single_colorbar(), by default None
- Returns:
The axes containing the plots.
- Return type:
npt.NDArray[Axes]