centrality_scores#
- squidpy.pl.centrality_scores(adata, *, cluster_key, score=None, legend_kwargs=mappingproxy({}), palette=None, figsize=None, dpi=None, save=None, **kwargs)[source]#
Plot centrality scores.
The centrality scores are computed by
squidpy.gr.centrality_scores().- Parameters:
- adata
AnnData Annotated data object.
- cluster_key
str Key in
anndata.AnnData.obswhere clustering is stored.- score
Literal['degree_centrality','average_clustering','closeness_centrality'] |Sequence[Literal['degree_centrality','average_clustering','closeness_centrality']] |None(default:None) Whether to plot all scores or only selected ones.
- legend_kwargs
Mapping[str,Any] (default:mappingproxy({})) Keyword arguments for
matplotlib.pyplot.legend().- palette
str|ListedColormap|None(default:None) Categorical colormap for the clusters. If
None, useanndata.AnnData.uns['{cluster_key}_colors'], if available.- figsize
tuple[float,float] |None(default:None) Size of the figure in inches.
- dpi
int|None(default:None) Dots per inch.
- save
str|Path|None(default:None) Whether to save the plot.
- scalebar_kwargs
Keyword arguments for
matplotlib_scalebar.ScaleBar.- edges_kwargs
Keyword arguments for
networkx.drawing.nx_pylab.draw_networkx_edges()[Hagberg et al., 2008].- kwargs
Any Keyword arguments for
matplotlib.pyplot.scatter()ormatplotlib.pyplot.imshow().
- adata
- Returns:
None– Nothing, just plots the figure and optionally saves the plot.