Many of the graphs generated in the geometric graph generator example have >1000 edges. Drawing edges got significantly slower with networkx/networkx#4360 (as expected). This PR adds a helper function to the example using LineCollection for visualizing edges. In the most drastic cases this results in >100x speedup for running the cells where >1000 edges are being drawn, greatly reducing the overall execution time for this notebook.
Many of the graphs generated in the geometric graph generator example have >1000 edges. Drawing edges got significantly slower with networkx/networkx#4360 (as expected). This PR adds a helper function to the example using LineCollection for visualizing edges. In the most drastic cases this results in >100x speedup for running the cells where >1000 edges are being drawn, greatly reducing the overall execution time for this notebook.