mantispy.pl.cluster_composition#
- mantispy.pl.cluster_composition(composition, groupby='Metadata_Perturbation', ax=None)[source]#
Stacked bars of cell-state fractions, averaged within each group.
- Parameters:
- composition
AnnData The well-level object
cluster_composition()returns, holding one cluster per feature.- groupby
str(default:'Metadata_Perturbation') obscolumn whose groups become the bars.- ax
Axes|None(default:None) Axes to draw on, or
Nonefor a new figure.
- composition
- Return type:
- Returns:
The axes when the caller passed
ax, elseNonebecause the plot then owns the figure it created. When returned they hold one bar per group ofgroupbyin the order the groups first appear and one stacked segment per cluster.- Raises:
KeyError –
obshas nogroupbycolumn.