Return graph from tree data format.
Parameters: | data : dict
|
---|---|
Returns: | G : NetworkX DiGraph attrs : dict
|
See also
Notes
The default value of attrs will be changed in a future release of NetworkX.
Examples
>>> from networkx.readwrite import json_graph
>>> G = nx.DiGraph([(1,2)])
>>> data = json_graph.tree_data(G,root=1)
>>> H = json_graph.tree_graph(data)