squidpy.pl.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 inanndata.AnnData.obs
where clustering is stored.clusters (
Union
[str
,Sequence
[str
],None
]) – Cluster instances for which to plot conditional probability.palette (
Union
[str
,ListedColormap
,None
]) – Categorical colormap for the clusters. IfNone
, useanndata.AnnData.uns
['{cluster_key}_colors']
, if available.figsize (
Optional
[tuple
[float
,float
]]) – Size of the figure in inches.scalebar_kwargs – Keyword arguments for
matplotlib_scalebar.ScaleBar()
.edges_kwargs – Keyword arguments for
networkx.draw_networkx_edges()
.kwargs (
Any
) – Keyword arguments formatplotlib.pyplot.scatter()
ormatplotlib.pyplot.imshow()
.legend_kwargs (
Mapping
[str
,Any
]) – Keyword arguments formatplotlib.pyplot.legend()
.kwargs – Keyword arguments for
seaborn.lineplot()
.
- Return type:
- Returns:
: Nothing, just plots the figure and optionally saves the plot.