summaryrefslogtreecommitdiff
path: root/examples/drawing/plot_degree.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/drawing/plot_degree.py')
-rw-r--r--examples/drawing/plot_degree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/drawing/plot_degree.py b/examples/drawing/plot_degree.py
index 6fc5994b..9d7abe4a 100644
--- a/examples/drawing/plot_degree.py
+++ b/examples/drawing/plot_degree.py
@@ -19,7 +19,7 @@ import matplotlib.pyplot as plt
G = nx.gnp_random_graph(100, 0.02, seed=10374196)
-degree_sequence = sorted([d for n, d in G.degree()], reverse=True)
+degree_sequence = sorted((d for n, d in G.degree()), reverse=True)
dmax = max(degree_sequence)
fig = plt.figure("Degree of a random graph", figsize=(8, 8))