Graphviz:具有尖头但不带箭头的边缘

时间:2019-07-11 22:46:50

标签: graphviz dot

是否可以在graphviz dot中显示看起来像这样的边?

edge without arrowheads but with a point

使用penwidth可以使边缘变宽很容易,并且{em}几乎可以使用arrowhead=diamond,arrowscale=0.1来获得“ b”端(箭头的点),尽管那是不太正确;菱形仍比边缘稍微宽,而进一步减小arrowscale似乎无济于事。而且我完全不知道如何以“缩进”点来结束“ a”。

通过使用arrowtail=inv并将尾部颜色设置为背景颜色,可以

digraph G {
    graph [splines=ortho,bgcolor="white"];
    edge [penwidth=5,arrowhead="diamond",arrowtail="inv",arrowsize=0.01,
    color="white;0.001:white;0.001:black",dir=both];
    node [shape=none,fontname="sans"];
    a -> b;
}

如下所示:

enter image description here

有点笨拙,但是可以使用...但是dir=both的边缘指向错误的方向!尽管边本身被声明为a至b,但它仍从b指向a。而要同时拥有arrowheadarrowtail的边缘,则必须拥有dir=both

0 个答案:

没有答案
相关问题