spateo.plotting.interactive.agg#

Interactive plotting functions for aggregated UMI counts.

Module Contents#

Functions#

contours(→ plotly.graph_objects.Figure)

Interactively display UMI density bins.

select_polygon(→ matplotlib.widgets.PolygonSelector)

Display raw data within an AnnData with interactive polygon selection.

spateo.plotting.interactive.agg.contours(adata: anndata.AnnData, layer: str, colors: Optional[List] = None, scale: float = 0.05) plotly.graph_objects.Figure[source]#

Interactively display UMI density bins.

Parameters
adata

Anndata containing aggregated UMI counts.

layer

Layer to display

colors

List of colors.

scale

Scale width and height by this amount.

Returns

A Plotly figure

spateo.plotting.interactive.agg.select_polygon(adata: anndata.AnnData, layer: str, out_layer: Optional[str] = None, ax: Optional[matplotlib.axes.Axes] = None, background: Optional[str] = None, **kwargs) matplotlib.widgets.PolygonSelector[source]#

Display raw data within an AnnData with interactive polygon selection.

Parameters
adata

Anndata containing aggregated UMI counts.

layer

Layer to display. Defaults to X.

out_layer

Layer to output selection result as a boolean mask. Defaults to {layer}_selection.

ax

Axes to plot.

background

string or None (optional, default ‘None`) The color of the background. Usually this will be either ‘white’ or ‘black’, but any color name will work. Ideally one wants to match this appropriately to the colors being used for points etc. This is one of the things that themes handle for you. Note that if theme is passed then this value will be overridden by the corresponding option of the theme.

**kwargs

Additional keyword arguments are all passed to spateo.pl.imshow().