1

I want to have the 'start middle end' label appear at the top of my graph

But it seems to default to the bottom no matter where I put the code. Is it possible?

digraph G {
  rankdir=LR;

{node [shape=plaintext, fontsize=16];
"Start"->"Middle"->"End"[style=invis];
}

node [shape=box];
{ rank=same
"Start";a;
}
{ rank=same
"Middle";b;d;
}
{ rank=same
"End";c;e;
}

"a"->"b"->"c";
"d"->"e";

}
einpoklum
  • 118,144
  • 57
  • 340
  • 684
jkmelbs
  • 444
  • 5
  • 14

1 Answers1

2

This works for me.

digraph G {
  rankdir=LR;
  {
    node [shape=box];
    blank [style=invisible]
    blank -> d [style=invisible dir=none]
    "a"->"b"->"c";
    "d"->"e";
  }
  {
    node [shape=plaintext, fontsize=16];
    "Start"->"Middle"->"End"[style=invisible dir=none];
  }
}

enter image description here

ob1
  • 1,792
  • 15
  • 20
  • OP here - bit of confusion. answer needs to retain the rank=same groupings. I auto generate this so cant use hand crafted hacks with blank nodes unforunately – jkmelbs Aug 03 '16 at 00:05