0

I'm using Debian Jessie. I've been working on dot today and I haven't been able to order anything - even using the invisible nodes trick, rank=max, rank=same, etc. For example, this example:

digraph hierarchy {

                nodesep=1.0 // increases the separation between nodes

                node [color=Red,fontname=Courier,shape=box] //All nodes will this shape and colour
                edge [color=Blue, style=dashed] //All the lines look like this

                Headteacher->{Deputy1 Deputy2 BusinessManager}
                Deputy1->{Teacher1 Teacher2}
                BusinessManager->ITManager
                {rank=same;ITManager Teacher1 Teacher2}  // Put them on the same level
}

from here just isn't ordering for me -regardless of which engine I choose, e.g., dot -Kfdp, fdp -Kfdp, neato, etc.

Everything starts with the Headteacher in the middle - even with

Headteacher [label="head teacher", rank=max]

Similarly, the ordering example here fails as well.

I just discovered that though my local attempts fail, eveything works as expected on GraphvizFiddle. ?

Community
  • 1
  • 1
d-cubed
  • 1,034
  • 5
  • 30
  • 58

1 Answers1

1

The Graphviz command line reference confirms the -K switch to select the layout algorithm to override any inferred from the name of the command alias. If you need to use the dot engine, and you are not using the dot command, then you will need to specify this explicitly as the switch parameter.

Most of the hierarchical attributes you are specifying only apply to the hierarchical dot engine and have no impact otherwise. The summary identifies which engines are affected by each attribute.

Pekka
  • 3,529
  • 27
  • 45
  • From the man page, "layout=engine indicates the preferred layout engine ("dot", "neato", fdp" etc) overriding the default from the basename of the command or the -K commandline option." It's capital K. Which I'd been using. – d-cubed Jun 24 '16 at 16:12
  • I don't even know what the problem was. Everything I'd read suggested I had to use fdp - not neato. fdp, twopi, neato did not work. Straight forward dot did. – d-cubed Jun 24 '16 at 16:19