mantispy.pl.plate#
- mantispy.pl.plate(adata, color, plate=None, groupby=None, agg='median', ncols=4, share_colorbar=True, ax=None, cmap='viridis', **kwargs)[source]#
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:
The single
Axeswhen the caller passedax(valid only for one plate), elseNonebecause the plot then owns the figure it created. When several plates are drawn each panel is 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.