Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (20 sloc) 826 Bytes

Data I/O

It's not too hard to dump the returned visualization session to a json-file to restore it easily, but we wrote a wrapper for that nevertheless.

Start a visualization like this

import networkx as nx
import netwulf as wulf

G = nx.barabasi_albert_graph(100,2)

stylized_network, config = wulf.visualize(G)

You can either save/load the stylized network only

wulf.save("BA.json", stylized_network, config)
stylized_network, config, _ = wulf.load("BA.json")
wulf.draw_netwulf(stylized_network, config)

Or you can save/load with the respective networkx.Graph-object in order to replicate some other features.

wulf.save("BA.json", stylized_network, config, G)
stylized_network, config, G = wulf.load("BA.json")
You can’t perform that action at this time.