我正在尝试在GraphViz / dot中绘制一个小图。 方框"第1队"," Turnier32"和#34;第2队"应该在一个水平的水平上。 "第1队"指向" Turnier32"," Team 2"向左转。 我想要省略号" Name1"," 2015-11-14"和" Name2"在相应的节点下面。应该只有直的水平和垂直边缘。 我目前的做法是:
digraph turnier{
ordering=out ;
subgraph {
rank=same;
T1 [shape="box", label="Team 1"];
TOURNAMENT [shape="box", label="Turnier32"];
T2 [shape="box", label="Team 2"];
}
subgraph {
rank=same;
N1 [shape="ellipse", label="Name1"];
DATE [shape="ellipse", label="2015-11-14"];
N2 [shape="ellipse", label="Name2"];
}
T1 -> N1 [label="hasName"];
TOURNAMENT -> DATE [label="occuredOnDate"];
T2 -> N2 [label="hasName"];
T1 -> TOURNAMENT [label="attended"];
T2 -> TOURNAMENT [label="attended"];
}
GraphViz将T1,TOURNAMENT和T2重新排序为T1,T2,TOURNAMENT,这不是我想要的。如果我击出最后两个边,则顺序正确。
答案 0 :(得分:2)
只需添加到您的上一行constraint=false
:
T2 -> TOURNAMENT [label="attended", constraint=false];