Node Separation by Edge weight or length Attribute

Hi :
I'm using graphviz for showing connectivity between nodes. Each pair of nodes has a specific weight corresponds to their similarity. To my knowledge, neato admits user to specify weight or len attribute on each edge for its length. And I've tried to map similarity of each pair of nodes to corresponding weight or len attribute for each connecting edge.
However, I found resulting graph does not obey with my settings. For instance, there may exists node c that is closer to node a than node b is, while (a, b) has weight extremely larger than (a, c) in my setting. I wonder if there're some attributes to set such that distances between pair of nodes in the resulting figure can somehow (reversely) proportional to their similarity value. (Under my trail, edge attributes weight and len cannot satisfy with it.)
Moreover, hundreds of nodes can be found in my real problem. (If there're only such three nodes, the resulting graph seems fine.)
BTW, I've set overlap = false and let all edges remain straight lines.
 
Thank you.
 

Node Separation by Edge

The len attribute specifies the desired edge length; the weight attribute specifies some notion as to how important the edge is. In general, a higher weight should produce an edge whose length is closer to the specified length. However, there are certain caveats.

  • At present, the default algorithm used by neato does not support the weight attribute. Try using mode=KK.
  • The actual length used, by default, is the graph-theoretic distance, which may be very different from any input edge length. You can get around this by using model=mds and supplying all pair lengths using a complete graph.
  • Neato is doing a global optimization. If may be that the minimum it finds requires local lengths being very different from what you specified.
  • Using overlap=false should cause minimal distortion but it will still change the relative edge lengths.

Recent comments