Edge weight not changing node position in neato?

I’m trying to use the [weight] attribute in a neato graph but changing the values does not appear to do anything?

Example file:

graph G {
  a -- b [weight="10.0"]
  a -- c [weight="1.0" ]
  a -- d [weight="1000.1"]
  b -- c [weight="1"]
}

test-graph

I was expecting a -- d to be much closer together than the others, but it doesn’t seem to matter what values I put, the graph does not change at all.

I am on windows if that matters.

If you want to get d closer to a, try the len attribute. Weight will just help enforce len

… a larger weight encourages the layout to make the edge length closer to that specified by the len attribute.

I believe the default len attribute is 1.0 if not specified? Should I make len higher? Or make it bigger for the ones that should be farther apart?

This is just an example, my actual data is a social graph with like 100 nodes where I’ve calculated an edge-weight between nodes based on amount of interaction between the nodes. Should I be trying to programmatically generate different len values in addition or instead?

I was hoping that I could just specify a weight attribute and then the force direction algorithm would just “figure it out” based on that attribute since the only initial information I have are the edges that exist between nodes and their weight I’m trying to use graphviz to draw and thereby better understand what the shape of the social graph is.

graph G {
  a -- b [weight="1.0" len=2 ]
  a -- c [weight="1.0" len=2 ]
  a -- d [weight="1" len=1 ]
  b -- c [weight="1" len=2 ]
}

If I set different len values, that seems to change the graph:
test-graph

But setting a weight value still doesn’t seem to do anything. Whether the weight is 1 or 1000 the graph remains the same. Is that because it only matters when there are more nodes to try to lay out?

BTW, the CLI command I’m running is neato -Tpng neato-test.gv -o test-graph.png

I was able to generate a graph using real data that looked more reasonable by skipping the weight and just setting len inversely to weight (higher weight = smaller len) and that seemed to do the trick.