diff options
| author | Dan Schult <dschult@colgate.edu> | 2019-10-10 10:16:26 -0400 |
|---|---|---|
| committer | Jarrod Millman <jarrod.millman@gmail.com> | 2019-10-12 09:26:31 -0700 |
| commit | cff8cfdd398d17c80ac21b2515414d7b4c9c200b (patch) | |
| tree | 1b4c9b97bb7dd8a88e8cee04529a8f56d6af922f /examples/drawing/plot_giant_component.py | |
| parent | 777005b337ec177d121c2a4118e9fc9088e03202 (diff) | |
| download | networkx-cff8cfdd398d17c80ac21b2515414d7b4c9c200b.tar.gz | |
Remove deprecated from examples
Diffstat (limited to 'examples/drawing/plot_giant_component.py')
| -rw-r--r-- | examples/drawing/plot_giant_component.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/drawing/plot_giant_component.py b/examples/drawing/plot_giant_component.py index b51d4e0c..896de1d4 100644 --- a/examples/drawing/plot_giant_component.py +++ b/examples/drawing/plot_giant_component.py @@ -57,8 +57,8 @@ for p in pvals: node_size=10 ) # identify largest connected component - Gcc = sorted(nx.connected_component_subgraphs(G), key=len, reverse=True) - G0 = Gcc[0] + Gcc = sorted(nx.connected_components(G), key=len, reverse=True) + G0 = G.subgraph(Gcc[0]) nx.draw_networkx_edges(G0, pos, with_labels=False, edge_color='r', |
