mantispy.pl.cluster_composition#
- mantispy.pl.cluster_composition(composition, groupby='Metadata_Perturbation', ax=None)#
Stacked bars of cell-state fractions, averaged within each group.
Takes the object
cluster_composition()returns.- Parameters:
composition (
AnnData) – The well-level objectcluster_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, orNonefor a new figure.
- Return type:
- Returns:
The axes drawn on, with one bar per group of
groupbyin the order the groups first appear and one stacked segment per cluster.- Raises:
KeyError –
obshas nogroupbycolumn.