weight

Weight of edge

type: int | double, default: 1, minimum: 0(dot,twopi), 1(neato,fdp)

In dot, the heavier the weight, the shorter, straighter and more vertical the edge is.

For twopi, weight=0 indicates the edge should not be used in constructing a spanning tree from the root.

For other layouts, a larger weight encourages the layout to make the edge length closer to that specified by the len attribute.

Weights in dot must be integers.

Edge Weights
digraph {
  root -> a
  root -> b [weight=2]
  root -> c [weight=3]
}
Valid on:
  • Edges

Search the Graphviz codebase for "weight"