scviva.pl.plot_cell_type_map#

scviva.pl.plot_cell_type_map(adata, proportions, cell_type=None, basis='spatial', ax=None, **kwargs)[source]#

Plot spatial map of cell type proportion(s).

Parameters:
adata AnnData

AnnData object to plot into. Proportion columns are written to adata.obs as a side effect.

proportions DataFrame

DataFrame of shape (n_spots, n_cell_types) with cell type names as columns, aligned to adata.obs_names.

cell_type str | None

Name of the cell type to visualize. Must be a column of proportions. If None, all cell types are plotted as a grid.

basis str

Key in adata.obsm for spatial coordinates.

ax

Matplotlib axes. If None, a new figure is created.

**kwargs

Forwarded to scanpy.pl.embedding().