opendvp.pl.coefficient_of_variation#
- 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].
- Parameters:
adata (anndata.AnnData) – Annotated data matrix.
group_by (str) – Column in adata.obs to group by.
return_fig (bool, optional) – If True, returns the matplotlib Figure object for further customization. If False, shows the plot.
ax (matplotlib.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:
fig – The figure object if return_fig is True, otherwise None.
- Return type:
matplotlib.figure.Figure or None