cdlib.viz.plot_event_radars

cdlib.viz.plot_event_radars(lc: LifeCycle, set_name: str, min_branch_size: int = 1, colors: object | None = None)

Plot the radar of event weights for a given event set in both directions.

Parameters:
  • lc – the lifecycle object

  • set_name – the event set name, e.g. “0_2”

  • min_branch_size – the minimum size of a branch to be considered, defaults to 1

  • colors – the colors of the radar, defaults to None

Returns:

None

Example:

>>> from cdlib import TemporalClustering, LifeCycle
>>> from cdlib import algorithms
>>> from cdlib.viz import plot_flow
>>> import matplotlib.pyplot as plt
>>> from networkx.generators.community import LFR_benchmark_graph
>>> tc = TemporalClustering()
>>> for t in range(0, 10):
>>>     g = LFR_benchmark_graph(
>>>         n=250,
>>>         tau1=3,
>>>         tau2=1.5,
>>>         mu=0.1,
>>>         average_degree=5,
>>>         min_community=20,
>>>         seed=10,
>>>     )
>>>     coms = algorithms.louvain(g)  # here any CDlib algorithm can be applied
>>>     tc.add_clustering(coms, t)
>>> events = LifeCycle(tc)
>>> events.compute_events("facets")
>>> plot_event_radars(events, "0_2")
>>> plt.show()