I want to create a connected graph in IPython
notebook through NetworkX
. Previously, I use
erdos_renyi_graph
to generate a random graph, but I never get a connected graph, I want to use this graph to prove that my graph is a small world network. But the unconnected graph's average shortest path cannot be calculated. So please tell me how to generate a connected graph through NetworkX
.