Initialize and print a simple stream-graphΒΆ

An example plot of a stream_graph.StreamGraph made from a combination of stream_graph.NodeSetS, stream_graph.TimeSetDF , stream_graph.TemporalNodeSetDF, stream_graph.LinkStreamDF:

../_images/sphx_glr_plot_intro_001.png

using the stream_graph.Visualizer.

Out:



from __future__ import print_function
print(__doc__)

from stream_graph import Visualizer, TemporalLinkSetDF, NodeSetS, TemporalNodeSetDF, TimeSetDF, StreamGraph

nodeset = NodeSetS({1, 2, 3})
timeset = TimeSetDF([(0, 10)])
temporal_nodeset = TemporalNodeSetDF([(1, 1, 9), (2, 2, 5), (2, 7, 9)])
temporal_linkset = TemporalLinkSetDF([(1, 2, 2, 4), (1, 2, 3, 5), (1, 2, 6, 8)] , disjoint_intervals=False)
stream_graph = StreamGraph(nodeset, timeset, temporal_nodeset, temporal_linkset)

# Visualize svg
Visualizer().fit(stream_graph).save('../doc/auto_examples/images/sphx_glr_plot_intro_001.png', 'png')

Total running time of the script: ( 0 minutes 1.854 seconds)

Gallery generated by Sphinx-Gallery