From 1e6df4c105fa7a1e442da72ddb009bb253dc7d4e Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Fri, 21 Jul 2017 08:50:40 -0700 Subject: Refactor examples (#2527) * Fix unix_email and plot more examples * Fix doctest * Fix more examples * Fix AntiGraph.degree generator error in examples * Style/consistency changes and plot more examples --- examples/javascript/force.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/javascript') diff --git a/examples/javascript/force.py b/examples/javascript/force.py index fb6275fe..21b81040 100644 --- a/examples/javascript/force.py +++ b/examples/javascript/force.py @@ -7,16 +7,17 @@ Example of writing JSON format graph data and using the D3 Javascript library to """ # Author: Aric Hagberg -# Copyright (C) 2011-2016 by +# Copyright (C) 2011-2017 by # Aric Hagberg # Dan Schult # Pieter Swart # All rights reserved. # BSD license. import json + +import flask import networkx as nx from networkx.readwrite import json_graph -import flask G = nx.barbell_graph(6, 3) # this d3 example uses the name attribute for the mouse-hover value, @@ -32,11 +33,9 @@ print('Wrote node-link JSON data to force/force.json') # Serve the file over http to allow for cross origin requests app = flask.Flask(__name__, static_folder="force") - @app.route('/') def static_proxy(path): return app.send_static_file(path) - print('\nGo to http://localhost:8000/force.html to see the example\n') app.run(port=8000) -- cgit v1.2.1