def view_city(self):
pos = nx.circular_layout(self.city)
node_labels = {}
for u in self.city.nodes():
node_labels[u] = u
nx.draw(self.city, pos)
nx.draw_networkx_labels(self.city, pos, labels=node_labels)
self.btnViewCity.setEnabled(True)
plt.show()
评论列表
文章目录