def main():
# 建立带权图
G = nx.Graph()
# 向图中添加边,每条边都有一个权值
G.add_edge('A', 'B', weight=5)
G.add_edge('A', 'C', weight=3)
G.add_edge('A', 'D', weight=2)
G.add_edge('B', 'C', weight=1)
G.add_edge('B', 'D', weight=2)
G.add_edge('C', 'D', weight=4)
source=nameEntry1.get()
target=nameEntry2.get()
return nx.dijkstra_path(G, source, target)
# 两个指定顶点之间的最短加权路径的长度
return nx.dijkstra_path_length(G, source, target)
如何在tkinter用matplotlib把这些返回的点连接起来
不知道怎么绑定这些返回的点