I am having a problem displaying my graph on the network.
I extract some corner points from the drawing specified in the input file and save the corner points as a graph node in NetworkX. node contains the positions (x, y) of the corner points as they are received. Then I will show that the graph puts the nodes in their exact (x, y) position. However, when I show the graph using nx.draw(), the graph shows the shape obtained in the picture completely.
Here is some code:
pe = nx.Graph()
pe.add_node('p1', posxy=(ap[0][0], ap[0][1]))
pe.add_node('p2', posxy=(ap[1][0], ap[1][2]))
pe.add_node('p3', posxy=(ap[2][0], ap[2][3]))
pe.add_node('p4', posxy=(ap[3][0], ap[3][4]))
pe.add_node('p5', posxy=(ap[4][0], ap[4][5]))
pe.add_cycle(['p1','p2','p3','p4','p5'])
positions = nx.get_node_attributes(pe,'posxy')
nx.draw(pe, positions, node_size=500)
where posxy=(ap[0][0], ap[0][1])is the position in the plane of the found corner point. Corner points are saved in the list ap.
Here is the image of the resulting form:

and this shows the graph:

? , ?