📅  最后修改于: 2022-03-11 14:56:18.983000             🧑  作者: Mango
import networkx as nx
import matplotlib.pyplot as plt
G = nx.Graph()
G.add_edge(1,2)
G.add_edge(1,3)
nx.draw(G, with_labels=True)
plt.show()