liana.plotting.connectivity

liana.plotting.connectivity(adata: AnnData, idx: int, spatial_key='spatial', connectivity_key='spatial_connectivities', size=1, figure_size=(5.4, 5), return_fig: bool = True)

Plot spatial connectivity weights.

Parameters:
adata

Annotated data object.

spatial_key

Key in adata.obsm that contains the spatial coordinates. Default is ‘spatial’.

connectivity_key

Key in adata.obsp that contains the spatial connectivity matrix. Default is ‘spatial_connectivity’.

size

Size of the points

figure_size

Figure x,y size

return_fig

bool whether to return the fig object.

Returns:
A plotnine.ggplot instance