squidpy.pl.nhood_enrichment
- squidpy.pl.nhood_enrichment(adata, cluster_key, mode='zscore', annotate=False, method=None, title=None, cmap='viridis', palette=None, cbar_kwargs=mappingproxy({}), figsize=None, dpi=None, save=None, ax=None, **kwargs)[source]
Plot neighborhood enrichment.
The enrichment is computed by
squidpy.gr.nhood_enrichment().- Parameters:
adata (
AnnData) – Annotated data object.cluster_key (
str) – Key inanndata.AnnData.obswhere clustering is stored.mode (
Literal['zscore','count']) –Which
squidpy.gr.nhood_enrichment()result to plot. Valid options are:’zscore’ - z-score values of enrichment statistic.
’count’ - enrichment count.
annotate (
bool) – Whether to annotate the cells of the heatmap.method (
str|None) – The linkage method to be used for dendrogram/clustering, seescipy.cluster.hierarchy.linkage().cmap (
str) – Continuous colormap to use.cbar_kwargs (
Mapping[str,Any]) – Keyword arguments formatplotlib.figure.Figure.colorbar().palette (
str|ListedColormap|None) – Categorical colormap for the clusters. If None, useanndata.AnnData.uns['{cluster_key}_colors'], if available.figsize (
tuple[float,float] |None) – Size of the figure in inches.ax (
Axes|None) – Axes,matplotlib.axes.Axes.kwargs (
Any) – Keyword arguments formatplotlib.pyplot.text().
- Return type:
- Returns:
Nothing, just plots the figure and optionally saves the plot.