nichesphere.tl.plot_top_stats

Contents

nichesphere.tl.plot_top_stats#

nichesphere.tl.plot_top_stats(nw_stats, top_n=None, title_suffix='')#

Bar plots of the top nodes by betweenness, PageRank, and signed degree centrality.

Parameters:
  • nw_stats (pd.DataFrame) – Output of compute_network_stats().

  • top_n (int or None, default None) – If provided, only the top n nodes by each metric are shown. If None, all nodes are shown (useful for small networks).

  • title_suffix (str, default '') – Optional string appended to each subplot title (e.g. a process category name).

Returns:

fig – Figure containing four bar-plot axes (betweenness, PageRank, positive degree, negative degree).

Return type:

matplotlib.figure.Figure