co_occurrence#
- squidpy.pl.co_occurrence(adata, *, cluster_key, palette=None, clusters=None, figsize=None, dpi=None, save=None, legend_kwargs=mappingproxy({}), **kwargs)[source]#
Plot co-occurrence probability ratio for each cluster.
The co-occurrence is computed by
squidpy.gr.co_occurrence().- Parameters:
- adata
AnnData Annotated data object.
- cluster_key
str Key in
anndata.AnnData.obswhere clustering is stored.- clusters
str|Sequence[str] |None(default:None) Cluster instances for which to plot conditional probability.
- 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.
- scalebar_kwargs
Keyword arguments for
matplotlib_scalebar.ScaleBar.- edges_kwargs
Keyword arguments for
networkx.drawing.nx_pylab.draw_networkx_edges()[Hagberg et al., 2008].- kwargs
Any Keyword arguments for
matplotlib.pyplot.scatter()ormatplotlib.pyplot.imshow().- legend_kwargs
Mapping[str,Any] (default:mappingproxy({})) Keyword arguments for
matplotlib.pyplot.legend().- kwargs
Keyword arguments for
seaborn.lineplot().
- adata
- Returns:
None– Nothing, just plots the figure and optionally saves the plot.