Sometimes to annotate a diagram (made with GraphViz) it would be good to add extra edges. For example, given the final analysis example from KF86 (figure 1) it would be helpful to show the path taken by the algorithm through this tree (see for the dot file).

Figure 1: Final Analysis Data Structure

A naive addition of the algorithm path to the dot file is shown below:

n1 -> n2 -> n3 -> n5 -> n4 -> n7 -> n11 [color=red];

When creating the layout dot treats all edges identically, giving the layout shown in figure 2 (see

Figure 2: Layout change after additional path

Setting the edge attribute constrained to false prevents the consideration of that edge in setting node ranks, so the code:

n1 -> n2 -> n3 -> n5 -> n4 -> n7 -> n11 [color=red, constrained=false];

Gives the graph shown in figure 3, and in

Figure 3: Original layout, after addition of `constrained` parameter