2

我有以下代码:

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"];
}

这给了我:

在此处输入图像描述

我工作得很好,但 GitOject 方向的箭头并不异常,他们是一种方法吗?

为了您的帮助,在此先感谢。

4

1 回答 1

1

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

arrowtail总是指定义的边缘的尾部,并且不考虑dir=back.

于 2013-01-20T01:51:08.747 回答