【问题标题】:Can't order dot - Graphviz anymore无法订购 dot - Graphviz
【发布时间】:2016-06-25 06:06:33
【问题描述】:

我正在使用 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 也失败了。

我刚刚发现,虽然我的本地尝试失败了,但 GraphvizFiddle 上的一切都按预期工作。 ?

【问题讨论】:

    标签: graphviz dot


    【解决方案1】:

    Graphviz command line reference 确认 -K 开关以选择布局算法以覆盖从命令别名名称推断的任何内容。如果您需要使用 dot 引擎,而您没有使用 dot 命令,那么您需要将其显式指定为 switch 参数。

    您指定的大多数分层attributes 仅适用于分层dot 引擎,否则没有影响。摘要标识了受每个属性影响的引擎。

    【讨论】:

    • 从手册页中,"layout=engine 表示首选布局引擎("dot"、"neato"、fdp" 等)覆盖命令的基本名称或 -K 命令行选项的默认值." 是大写的 K。我一直在使用它。
    • 我什至不知道问题出在哪里。我读到的所有内容都建议我必须使用 fdp - 而不是 neto。 fdp、twopi、neato 不起作用。直接点做了。
    猜你喜欢
    • 2021-06-04
    • 2013-08-15
    • 2015-10-22
    • 1970-01-01
    • 2016-03-01
    • 2012-10-25
    • 1970-01-01
    • 2013-04-03
    相关资源
    最近更新 更多