I want to draw an undirected, weighted, and complete graph with networkx library. My aim is to draw this graph in a way that edge weights represent the distance between nodes.
For example, consider the set of nodes and edges below:
A, B, weight = 5.0
A, C, weight = 50.0
B, C, weight = 0.5
In this case, the distance between A-C is the smallest and B-C is the largest.
I was able to draw this with (after adding edges and nodes to G)
nx.draw(G, pos=None)
but, as the number of nodes gets bigger (above 6), inconsistencies occur. What I mean by this is that some nodes get closer although the weight of the edge connecting them is very low.
I assume some of the node positions don't get updated after some point, but I am not sure.
Any suggestions ?