diff options
author | Jarrod Millman <jarrod.millman@gmail.com> | 2020-12-01 14:25:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 14:25:08 -0800 |
commit | 5d05f63ad94ac7b14a016cce6c9bc5e897726c89 (patch) | |
tree | 71d8c6c4395ac738b41abaea210e03c4fdbdbac7 /examples | |
parent | 23391dda7241be73fa0d672087e29daca261c5c3 (diff) | |
download | networkx-5d05f63ad94ac7b14a016cce6c9bc5e897726c89.tar.gz |
Don't import nx from networkx (#4403)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic/plot_properties.py | 2 | ||||
-rw-r--r-- | examples/graph/plot_degree_sequence.py | 2 | ||||
-rw-r--r-- | examples/graph/plot_erdos_renyi.py | 2 | ||||
-rw-r--r-- | examples/graph/plot_roget.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/examples/basic/plot_properties.py b/examples/basic/plot_properties.py index 94ca2515..7eb25f33 100644 --- a/examples/basic/plot_properties.py +++ b/examples/basic/plot_properties.py @@ -7,7 +7,7 @@ Compute some network properties for the lollipop graph. """ import matplotlib.pyplot as plt -from networkx import nx +import networkx as nx G = nx.lollipop_graph(4, 6) diff --git a/examples/graph/plot_degree_sequence.py b/examples/graph/plot_degree_sequence.py index bd056f47..0d32091c 100644 --- a/examples/graph/plot_degree_sequence.py +++ b/examples/graph/plot_degree_sequence.py @@ -6,7 +6,7 @@ Degree Sequence Random graph from given degree sequence. """ import matplotlib.pyplot as plt -from networkx import nx +import networkx as nx # Specify seed for reproducibility seed = 668273 diff --git a/examples/graph/plot_erdos_renyi.py b/examples/graph/plot_erdos_renyi.py index 25069018..e1326760 100644 --- a/examples/graph/plot_erdos_renyi.py +++ b/examples/graph/plot_erdos_renyi.py @@ -12,7 +12,7 @@ sometimes called the Erdős-Rényi graph. """ import matplotlib.pyplot as plt -from networkx import nx +import networkx as nx n = 10 # 10 nodes m = 20 # 20 edges diff --git a/examples/graph/plot_roget.py b/examples/graph/plot_roget.py index 8f2587be..9f287a18 100644 --- a/examples/graph/plot_roget.py +++ b/examples/graph/plot_roget.py @@ -25,7 +25,7 @@ import re import sys import matplotlib.pyplot as plt -from networkx import nx +import networkx as nx def roget_graph(): |