squidpy.pl.interaction_matrix
- squidpy.pl.interaction_matrix(adata, cluster_key, annotate=False, method=None, title=None, cmap='viridis', palette=None, cbar_kwargs=mappingproxy({}), figsize=None, dpi=None, save=None, ax=None, **kwargs)[source]
Plot cluster interaction matrix.
The interaction matrix is computed by
squidpy.gr.interaction_matrix()
.- Parameters:
adata (
AnnData
) – Annotated data object.cluster_key (
str
) – Key inanndata.AnnData.obs
where clustering is stored.annotate (
bool
) – Whether to annotate the cells of the heatmap.method (
Optional
[str
]) – 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 (
Union
[str
,ListedColormap
,None
]) – Categorical colormap for the clusters. If None, useanndata.AnnData.uns
['{cluster_key}_colors']
, if available.figsize (
Optional
[tuple
[float
,float
]]) – Size of the figure in inches.ax (
Optional
[Axes
]) – Axes,matplotlib.axes.Axes
.kwargs (
Any
) – Keyword arguments formatplotlib.pyplot.text()
.
- Return type:
- Returns:
: Nothing, just plots the figure and optionally saves the plot.