我如何指导边缘走出右边的钻石?

时间:2010-05-06 13:12:26

标签: graphviz dot

我有一个简单的点图来展示如何进行测试。

PerformTests;                                     PerformTests<---+
PerformTests -> TestsPassed;                            |         |
TestsPassed [shape="diamond"];                          v         |
TestsPassed -> Release [label="Yes"];             TestsPassed     |
TestsPassed -> FixErrors [label="No"];                 Y|  N\     |
FixErrors -> PerformTests;                              v    FixErrors
                                                     Release 

该图显示了除了具有菱形形状的TestPassed之外的所有节点的方框。我的问题在这里。我喜欢钻石外面的边缘,因为No是从右边(东边)的钻石中取出而不是从右下方(东南方向)倾斜。

           What I have        What I want
                ^                  ^    
               / \                / \   
              <   >              <   >--->  
               \ /\               \ /   
                v  \               v    

我在点语法中看到了这样的compass_pt,但无法弄清楚如何使用它。我想要什么,怎么做?

2 个答案:

答案 0 :(得分:11)

只需在边缘声明(第5行)中的节点名称后面添加compass_pt :e

PerformTests;                                     PerformTests<-----+
PerformTests -> TestsPassed;                            |           |
TestsPassed [shape="diamond"];                          v     N     |
TestsPassed -> Release [label="Yes"];             TestsPassed --> FixErrors
TestsPassed:e -> FixErrors [label="No"];               Y|  
FixErrors -> PerformTests;                              v
                                                     Release 

答案 1 :(得分:0)

您也可以尝试使用constraint='false'属性:

http://martin-loetzsch.de/DOTML/constraint.html

相关问题