mantispy.pl.plate#
- mantispy.pl.plate(adata, color, plate=None, groupby=None, agg='median', ncols=4, share_colorbar=True, ax=None, cmap='viridis', **kwargs)#
Well-grid heatmap of
color, one panel per plate.- Parameters:
adata (
AnnData) – Object to draw. Works at cell or well resolution; several rows landing in the same well are combined withagg.color (
str) – A feature name or anobscolumn.plate (
str|None(default:None)) – Draw only this plate. By default every plate gets a panel.groupby (
str|None(default:None)) –obscolumn, constant per plate, to order and title the panels by, such as"Metadata_Batch".agg (
str(default:'median')) – How to combine rows sharing a well: median, mean, max or min.ncols (
int(default:4)) – Panels per row.share_colorbar (
bool(default:True)) – One color scale and colorbar for all panels, instead of one per panel.ax (
Axes|None(default:None)) – Axes to draw into. Only valid together withplate.cmap (
str(default:'viridis')) – Matplotlib colormap.kwargs (
Any) – Passed toimshow().vmin,vmaxornormset the scale.
- Return type:
- Returns:
A single
Axes, or an array of them for several plates in panel order, each panel labeled with the plate’s own well grid.- Raises:
ValueError –
aggis not one ofAGGREGATIONS,axwas passed for more than one plate,groupbyvaries within a drawn plate, or it orMetadata_Platehas missing values.KeyError –
coloris neither a feature name nor anobscolumn,groupbyis not anobscolumn, orplateis not a plate ofadata.