opendvp.plotting.density

Contents

opendvp.plotting.density#

opendvp.plotting.density(adata, color_by, return_fig=False, ax=None, **kwargs)#

Plot density (KDE) plots of protein abundance grouped by a categorical variable in AnnData.obs.

Return type:

Figure | None

Parameters#

adataAnnData

Annotated data matrix.

color_bystr

Column in adata.obs to group/hue by.

return_figbool, optional

If True, returns the matplotlib Figure object for further customization. If False, shows the plot.

axmatplotlib.axes.Axes, optional

Axes object to plot on. If None, a new figure and axes are created.

**kwargs

Additional keyword arguments passed to seaborn.kdeplot.

Returns:#

figmatplotlib.figure.Figure or None

The figure object if return_fig is True, otherwise None.