c2v.pl.pca_loadings

Contents

c2v.pl.pca_loadings#

c2v.pl.pca_loadings(adata, key='gPCs', comp=0, n_genes=5, kind='v', ax=None, show=True, return_fig=False, title=None, full_border=False, figsize=None)#

Plot PCA loadings for a given component.

Parameters:
adata sc.AnnData

Annotated data matrix.

key str

Key for PCA loadings in adata.varm.

comp int

Component to plot.

n_genes int

Number of genes to plot.

kind Literal["h", "v"]

Kind of plot, either “h” for horizontal or “v” for vertical.

ax matplotlib.axes.Axes | None

Axes object to plot on.

show bool

Whether to show the plot.

return_fig bool

Whether to return the figure object.

title str | None

Title for the plot.

full_border bool

Whether to draw full border around the plot.

figsize tuple[float, float] | None

Figure size.

Return type:

Axes | Figure | None

Returns:

ax: matplotlib.axes.Axes | None Axes object with the plot.