liana.plotting.connectivity#
- liana.plotting.connectivity(adata, idx, spatial_key='spatial', connectivity_key='spatial_connectivities', size=1, figure_size=(5.4, 5), return_fig=True)#
Plot spatial connectivity weights.
- Parameters:
adata (
AnnData) – Annotated data object.idx (
int) – Column index of the connectivity weights to plot.spatial_key (
str(default:'spatial')) – Key inadata.obsmthat contains the spatial coordinates. Default is'spatial'.connectivity_key (
str(default:'spatial_connectivities')) – Key inadata.obspthat contains the spatial connectivity matrix. Default is'spatial_connectivity'.size (
float(default:1)) – Size of the pointsfigure_size (
tuple[float,float] (default:(5.4, 5))) – Figure x,y sizereturn_fig (
bool(default:True)) –boolwhether to return the fig object.
- Return type:
Figure- Returns:
The resulting connectivity plot.
- Raises:
AssertionError – If
connectivity_keyorspatial_keyare not inadata.obsporadata.obsmrespectively.