Simple PathΒΆ
Draw a graph with matplotlib.
import matplotlib.pyplot as plt
import networkx as nx
G = nx.path_graph(8)
nx.draw(G)
plt.show()
Total running time of the script: ( 0 minutes 0.060 seconds)
Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
Draw a graph with matplotlib.
import matplotlib.pyplot as plt
import networkx as nx
G = nx.path_graph(8)
nx.draw(G)
plt.show()
Total running time of the script: ( 0 minutes 0.060 seconds)