I’m working on drawing a family tree using the DOT language and Graphviz. While I’ve utilized auxiliary nodes to improve the tree’s layout, I’m encountering an issue where certain nodes are positioned illogically. Specifically, node “J” should be placed next to node “I”, but it appears far to the right instead.
digraph FamilyTree {
edge [dir=none, penwidth=2];
rankdir=TB;
"A" [shape=BOX, ];
"B" [shape=BOX,];
"C" [shape=BOX, ];
"D" [shape=BOX,];
"E" [shape=BOX, ];
"F" [shape=BOX, ];
"c1" [shape=point, label="",width=0.01, height=0.01];
"c1" -> "F" [arrowhead=none];
"G" [shape=BOX, ];
"c2" [shape=point, label="",width=0.01, height=0.01];
"c2" -> "G" ;
"H" [shape=BOX, ];
"I" [shape=BOX, ];
"c3" [shape=point, label="",width=0.01, height=0.01];
"c3" -> "I" ;
"J" [shape=BOX, ];
"c4" [shape=point, label="",width=0.01, height=0.01];
"c4" -> "J" ;
"K" [shape=BOX,];
"c5" [shape=point, label="",width=0.01, height=0.01];
"c5" -> "K" ;
"L" [shape=BOX, ];
"c6" [shape=point, label="",width=0.01, height=0.01];
"c6" -> "L" ;
"M" [shape=BOX, ];
"c7" [shape=point, label="",width=0.01, height=0.01];
"c7" -> "M" ;
"Couple_5780_1" [shape=point, color=gray, label=""];
"Couple_5355_1" [shape=point, color=gray, label=""];
"Couple_8222_1" [shape=point, color=gray, label=""];
"Couple_8222_2" [shape=point, color=gray, label=""];
"Couple_8222_3" [shape=point, color=gray, label=""];
{ rank=same; "A" -> "Couple_5780_1" -> "B" }
{ rank=same; "C" -> "Couple_5355_1" -> "D" }
{ rank=same;"E"->"Couple_8222_1"->"F"->"Couple_8222_2"->"G"->"Couple_8222_3"->"H"}
"c3" -> "c4" [arrowhead=none,constraint=false];
{ rank=same; "c3"; "c4"; }
"c6" -> "c7" [arrowhead=none,constraint=false];
{ rank=same; "c6"; "c7"; }
"Couple_5780_1" -> "c1" ;
"Couple_5355_1" -> "c2";
"Couple_8222_1" -> "c3" ;
"Couple_8222_2" -> "c5";
"Couple_8222_3" -> "c6" ;
}