opendvp.plotting.coefficient_of_variation

opendvp.plotting.coefficient_of_variation#

opendvp.plotting.coefficient_of_variation(adata, group_by, return_fig=False, ax=None, **kwargs)#

Plot coefficient of variation (CV) for each group in AnnData.obs[group_by].

Return type:

Figure | None

Parameters#

adataAnnData

Annotated data matrix.

group_bystr

Column in adata.obs to group 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.boxplot.

Returns:#

figmatplotlib.figure.Figure or None

The figure object if return_fig is True, otherwise None.