python-jgrapht
python-jgrapht copied to clipboard
Extracting positions from layout should use vertex number, not index.
To convert the output of the layout algorithm to the dictionary mapping vertices to their positions one must use the vertex number, not the vertex index. This is particularly evident if the graph is a masked subgraph, in witch the i-th vertex needs not to be i.