from matplotlib import pyplot as plt import networkx as nx G = nx.random_geometric_graph(200, 0.125) nx.draw(G, node_size = 20) plt.savefig("graph.png") plt.show()