tnetwork.plot_as_graph

tnetwork.plot_as_graph(dynamic_graph, communities=None, ts=None, width=800, height=600, slider=False, to_datetime=False, bokeh=False, auto_show=False, **kwargs)[source]

Plot to see the static graph at each snapshot

can be row of graphs or an interactive graph with a slider to change snapshot. In all cases, the position of nodes is the same in all snapshots.

The position of nodes is determined using the networkx force directed layout, addition parameters of the function are passed to this functions (e.g., iterations=100, k=2…)

Parameters:
  • dynamic_graph – DynGraphSN
  • communities – dynamic snapshot_affiliations of the network (can be ignored)
  • ts – time of snapshot(s) to display. single value or list. default None means all snapshots.
  • slider – If None, a slider allows to interactively choose the step (work only in jupyter notebooks on a local machine)
  • to_datetime – one of True/False/function. If True, step IDs are converted to dates using datetime.utcfromtimestamp. If a function, should take a step ID and return a datetime object.
  • width – width of the figure
  • height – height of the figure
Returns:

bokeh layout containing slider and plot, or only plot if no slider.