nhood_enrichment_dotplot#
- squidpy.pl.nhood_enrichment_dotplot(adata, *, cluster_key, annotate=False, title=None, cmap='RdBu_r', figsize=None, dpi=None, size_range=(10, 200), save=None, ax=None, **kwargs)[source]#
Dot plot of neighborhood enrichment.
The enrichment is computed by
squidpy.gr.nhood_enrichment(). Color shows the z-score, dot size the conditional cell ratio (CCR) fromnormalization='conditional'– the fraction of cells of the row type having at least one neighbor of the column type.- 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 dots with their CCR values.
- title
str|None(default:None) The title of the plot.
- cmap
str(default:'RdBu_r') Diverging colormap for the z-score, centered on zero whenever the data spans both signs.
- size_range
tuple[float,float] (default:(10, 200)) Smallest and largest dot size, which the CCR is scaled onto.
- 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
scanpy.pl.DotPlot.style().
- adata
- Returns:
None– Nothing, just plots the figure and optionally saves the plot.