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.obs
or a mapping of group names to keys inadata.obs
corresponding 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 ifkey
is a single key.
- Return type
- Returns
plot If
show = False
returns the current figure (ifkey
is a mapping) or the current axes (ifkey
is a string). Ifshow = True
returns nothing.