weight

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

Weight of edge.

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
Last modified July 2, 2021 : Add weight attribute example (b24bc62)