不能订购点 - Graphviz了

时间:2016-06-21 21:26:58

标签: graphviz dot

我正在使用Debian Jessie。 我今天一直在研究dot并且我无法订购任何东西 - 即使使用隐形节点技巧,rank = max,rank = same等。 例如,这个例子:

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
}
来自here

不是为我订购 - 无论我选择哪种引擎,例如dot -Kfdp, fdp -Kfdp, neato, etc

一切都始于中间的校长 - 即使是

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

同样,排序示例here也失败了。

我刚刚发现虽然我的本地尝试失败,但是eveything在GraphvizFiddle上按预期工作。 ?

1 个答案:

答案 0 :(得分:1)

Graphviz command line reference确认 -K 开关选择布局算法以覆盖从命令别名名称推断出的任何内容。如果您需要使用引擎,并且未使用命令,则需要将此明确指定为switch参数。

您指定的大多数分层attributes仅适用于分层引擎,否则不会产生任何影响。摘要标识了每个属性影响的引擎。