diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2020-12-10 15:56:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 15:56:04 -0800 |
commit | afc59cbcb5f5c60ea2a2d856c7fb2fd4e0473164 (patch) | |
tree | f2606e2c0cdc1388029501842f720d0bf64b6047 /examples | |
parent | 557e25f9af27f64754c380fd3d3086282c2197a4 (diff) | |
download | networkx-afc59cbcb5f5c60ea2a2d856c7fb2fd4e0473164.tar.gz |
Deprecate jit (#4428)
* Remove example
* Deprecate jit_graph / jit_data
Diffstat (limited to 'examples')
-rw-r--r-- | examples/external/plot_jit.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/examples/external/plot_jit.py b/examples/external/plot_jit.py deleted file mode 100644 index e78c46dd..00000000 --- a/examples/external/plot_jit.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -================================ -JavaScript InfoVis Toolkit (JIT) -================================ - -An example showing how to use the JavaScript InfoVis Toolkit (JIT) -JSON export - -See the JIT documentation and examples at https://philogb.github.io/jit/ -""" - -import json - -import matplotlib.pyplot as plt -import networkx as nx - -# add some nodes to a graph -G = nx.Graph() - -G.add_node("one", type="normal") -G.add_node("two", type="special") -G.add_node("solo") - -# add edges -G.add_edge("one", "two") -G.add_edge("two", 3, type="extra special") - -# convert to JIT JSON -jit_json = nx.jit_data(G, indent=4) -print(jit_json) - -X = nx.jit_graph(json.loads(jit_json)) -print(f"Nodes: {list(X.nodes(data=True))}") -print(f"Edges: {list(X.edges(data=True))}") - -nx.draw(G, pos=nx.planar_layout(G), with_labels=True) -plt.show() |