I'm trying to use graphviz to create a branching diagram based on a time line. However, when I try to connect the rows of nodes to show that they have branched from another row of nodes, the order gets mixed around. Is there any way to specify the order of rows?
I've tried used various rank settings for nodes but nothing really seems to work. I've tried invisible nodes and edges as well, but that doesn't help either.
I'd like to be able to stack the rows, so that when a new branch is created off of an old one, that will appear above the row that it branched off of. As the code stands right now, the branches appear in the right order, but when I try to connect the branches to show the relationship, that's when the order gets messed up. Does anyone have experience with something similar?
digraph G{
ranksep = 0.05;
rankdir="LR";
node[width=0.5, height=0.5, shape=plaintext];
edge[weight=10, arrowhead=none];
"7/2014" -> "8/2014" -> "9/2014" -> "10/2014" -> "11/2014" -> "12/2014" -> "1/2015" -> "2/2015" -> "3/2015" -> "4/2015" -> "5/2015" -> "6/2015" -> "7/2015" -> "8/2015";
node[shape=square, style="filled,rounded", fillcolor=red];
"Trunk 7/2014" -> "Trunk 8/2014" -> "Trunk 9/2014" -> "Trunk 10/2014" -> "Trunk 11/2014" -> "Trunk 12/2014" -> "Trunk 1/2015" -> "Trunk 2/2015" -> "Trunk 3/2015" -> "Trunk 4/2015" -> "Trunk 5/2015" -> "Trunk 6/2015" -> "Trunk 7/2015" -> "Trunk 8/2015";
node[shape=square, style="filled,rounded", fillcolor=blue];
"Second 8/2014" -> "Second 9/2014" -> "Second 10/2014" -> "Second 11/2014" -> "Second 12/2014" -> "Second 1/2015" -> "Second 2/2015" -> "Second 3/2015" -> "Second 4/2015" -> "Second 5/2015" -> "Second 6/2015" -> "Second 7/2015" -> "Second 8/2015";
node[shape=square, style="filled,rounded", fillcolor=green];
"Third 10/2014" -> "Third 11/2014" -> "Third 12/2014";
{rank=same; "7/2014";"Trunk 7/2014";}
{rank=same; "8/2014";"Trunk 8/2014";"Second 8/2014";}
{rank=same; "9/2014";"Trunk 9/2014";"Second 9/2014";}
{rank=same; "10/2014";"Trunk 10/2014";"Second 10/2014";"Third 10/2014";}
{rank=same; "11/2014";"Trunk 11/2014";"Second 11/2014";"Third 11/2014";}
{rank=same; "12/2014";"Trunk 12/2014";"Second 12/2014";"Third 12/2014";}
{rank=same; "1/2015";"Trunk 1/2015";"Second 1/2015";}
{rank=same; "2/2015";"Trunk 2/2015";"Second 2/2015";}
{rank=same; "3/2015";"Trunk 3/2015";"Second 3/2015";}
{rank=same; "4/2015";"Trunk 4/2015";"Second 4/2015";}
{rank=same; "5/2015";"Trunk 5/2015";"Second 5/2015";}
{rank=same; "6/2015";"Trunk 6/2015";"Second 6/2015";}
{rank=same; "7/2015";"Trunk 7/2015";"Second 7/2015";}
{rank=same; "8/2015";"Trunk 8/2015";"Second 8/2015";}
"Trunk 8/2014" -> "Second 8/2014"
}