digraph G {
graph [label = "TGH5 SDK\n\n\n", labelloc = t, labeljust = center,
fontname = Helvetica, fontsize = 18]
labeljust = center;
ranksep = .5;
node [shape = "box", style = rounded, fontsize = 12];
edge [fontsize = 9];
subgraph cluster_0 {
label = "External Services";
style = "dashed";
Language -> Geodata [style = "invis"];
Geodata -> Advertisement [style = "invis"];
}
subgraph cluster_1 {
label = "SDK";
style = "dashed";
Adapter -> Api;
}
subgraph cluster_2 {
label = "Vendors";
style = "dashed";
Philips -> Opera [style = "invis"];
Opera -> More [style = "invis"];
}
Language -> Api [constraint = false];
Advertisement -> Api [constraint = false];
Geodata -> Api [constraint = false];
Philips -> Adapter [constraint = false];
Opera -> Adapter [constraint = false];
More -> Adapter [constraint = false];
Game -> Api [rank = max, dir = both, constraint = false];
}
我想将Game
节点放在其他三个框下面,但无法弄清楚如何做到这一点。对不起,我是Graphviz的新手 - 实际上这是我第一次尝试使用它。所以我真的不知道在哪里看。
答案 0 :(得分:2)
附加的更改将为您提供所需的输出。问题是需要不可见的边缘将Game节点推到所有其他节点的下方。通常,强制布局包含的内容多于您可以用边缘优先级描述的结构实际上非常困难。
Api -> Game [dir = both];
{ Advertisement; More } -> Game [style = invis];