monkeybread.plot.kernel_density
- monkeybread.plot.kernel_density(adata, key, spot_size=None, cmap=None, show=True, title=None, ax=None)
Plots the results of
monkeybread.calc.kernel_density()usingscanpy.pl.embedding().- Parameters
adata (
Union[AnnData,Series,Dict[str,Series]]) – Annotated data matrix.key (
Union[str,Dict[str,str]]) – Either a key inadata.obsor a mapping of group names to keys inadata.obscorresponding to density columns.spot_size (
Optional[float] (default:None)) – The size of spots to plot.cmap (
Optional[str] (default:None)) – Colormap to use for values 0 to 1show (
Optional[bool] (default:True)) – Whether to show the plot or return itax (
Optional[Axes] (default:None)) – An Axes object to add the plot to. Only works ifkeyis a single key.
- Return type
- Returns
plot If
show = Falsereturns the current figure (ifkeyis a mapping) or the current axes (ifkeyis a string). Ifshow = Truereturns nothing.