Overlap graph on image using coordinates
问题 I have two lists of coordinates: first for x-coordinates and second for y-coordinates. I trying to use them as nodes of a graph. import networkx as nx list_of_coordinates_x = list(4.5 , 4, 67, 578, 68) #random numbers list_of_coordinates_y = list(6.7, 3, 12, 45.555, 692) G=nx.MultiGraph() for i in range(len(list_of_coordinates_x)): G.add_node(i, x = list_of_coordinates_x[i], y = list_of_coordinates_y[i]) if i > 0: G.add_edge(i-1,i) nx.draw(G,node_size=10,with_labels=False) But the all graphs