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 in
anndata.AnnData.obswhere clustering is stored.- annotate
bool(default:False) Whether to annotate the cells of the heatmap.
- method
str|None(default:None) The linkage method to be used for dendrogram/clustering, see
scipy.cluster.hierarchy.linkage().- title
str|None(default:None) The title of the plot.
- cmap
str(default:'viridis') Continuous colormap to use.
- cbar_kwargs
Mapping[str,Any] (default:mappingproxy({})) Keyword arguments for
matplotlib.figure.Figure.colorbar().- palette
str|ListedColormap|None(default:None) Categorical colormap for the clusters. If
None, useanndata.AnnData.uns['{cluster_key}_colors'], if available.- figsize
tuple[float,float] |None(default:None) Size of the figure in inches.
- dpi
int|None(default:None) Dots per inch.
- save
str|Path|None(default:None) Whether to save the plot.
- ax
Axes|None(default:None) Axes,
matplotlib.axes.Axes.- kwargs
Any Keyword arguments for
matplotlib.pyplot.text().
- adata
- Returns:
None– Nothing, just plots the figure and optionally saves the plot.