came.utils.plot.plot_stacked_bar¶
- came.utils.plot.plot_stacked_bar(df, norm=True, figsize=(6, 4), colors=None, cmap: str | Callable = 'tab20b', legend_loc=(1.02, 0.01))¶
helper function for visualizing the group compositions (e.g., in each stage or condition).
- Parameters:
df (pd.DataFrame) – the values in each row will be display as one stacked bar.
norm (bool) – whether to normalize each row to unit-sum.
figsize (tuple) –
colors (Sequence) –
cmap (Union[str, Callable]) – color-map function or color-map name
legend_loc (tuple) – the legend location
- Return type:
ax