You can use "ports" to set the points of connection.
I tried your graph on the online service, it seems your rendering is with dot http://dreampuf.github.io/GraphvizOnline
You can test with the others, Circo and the rest do not cross the cells, but by default they all draw on one side (bottom) and the edges are messy.
However there are "ports" properties which allow to solve that by specifying suffixes ":s", ":n" etc. n, s, e, w, nw, ne, sw, s. - i.e. south, north etc.... .
It seems that Dot has different default ports than Circo and Neato, the latter are fine with that:
digraph Structs {
node [shape=record];
s [label="<f0> 3|<f1> 13|<f2> 1|<f3>2|<f4>8|<f5>5"];
s:f0 -> s:f1;
s:f0 -> s:f2;
s:f1:n -> s:f3:n;
s:f1:n -> s:f4:n;
}
Dot needs to specify the ports of the first two nodes, too:
digraph Structs {
node [shape=record];
s [label="<f0> 3|<f1> 13|<f2> 1|<f3>2|<f4>8|<f5>5"];
s:f0:s -> s:f1:s;
s:f0:s -> s:f2:s;
s:f1:n -> s:f3:n;
s:f1:n -> s:f4:n;
}
So I guess, in your code:
s.edge("struct:f0:s", "struct:f1:s")
s.edge("struct:f0:s", "struct:f2:s")
s.edge("struct:f1:n", "struct:f3:n")
s.edge("struct:f1:n", "struct:f4:n")
See: How to prevent edges in graphviz to overlap each other
Graphviz Dot Edge Ports for Family Tree
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…