2013-01-19 41 views
1

我有以下代码:GraphViz的定制后退箭头

digraph "Classes utilisées par Git" 
{ 
    subgraph mother 
    { 
     O [shape=record, label = "{GitObject| ref (sha1)}"]; 
    } 
    subgraph herited 
    { 
     rankdir=LR; 
     rank="same"; 
     "Tree" [shape=box]; 
     "Tag" [shape=box]; 
     "Blob" [shape=box]; 
     "Commit" [shape=box]; 
    } 
    O -> "Tree" [arrowhead="onormal", dir=back]; 
    O -> "Blob" [arrowhead="onormal", dir=back]; 
    O -> "Commit" [arrowhead="onormal", dir=back]; 
    O -> "Tag" [arrowhead="onormal", dir=back]; 
    "Tree" -> "Tree" [arrowhead="vee", label=" 0..*\n0..*1"]; 
    "Tree" -> "Blob" [arrowhead="vee", label=" 0..*\n1"]; 
    "Commit" -> "Tree" [arrowhead="vee", label=" 1..*\n1"]; 
    "Tag" -> "Commit" [arrowhead="vee", label=" 0..*\n1"]; 
} 

这给了我:

enter image description here

我工作得很好,但在GitOject的方向箭头不是onormal,是他们的一种方式这是什么?

对您的帮助, 提前致谢。

回答

1

只是使用arrowtail="onormal"而不是arrowhead="onormal"的边缘显示不正确。

arrowtail总是指定义的边的尾部,并没有考虑到dir=back

+0

太棒了,它与dir = back – GlinesMome

+0

一起工作我似乎无法得到箭头工作,你能证实吗? (似乎不适用于有向图) –

相关问题