在 Graphviz 中,如何在边的中间添加形状?

In Graphviz, how do I add a shape in the middle of an edge?

我已经用红色注释了下图,以说明我要达到的效果:

知道如何在 Graphviz 中实现这个吗?

您可以通过找到合适的 unicode 符号来模仿此行为,例如,在您的情况下,,并使用 headlabel 属性将其放在正确的位置:

digraph {
    edge [arrowhead=none]
    Student [shape=rect]
    Faculty [shape=rect]
    o
    Player [shape=rect]

    Student -> o
    Faculty -> o
    o -> Player [
        headlabel="⋃"
        fontsize="25"
        labeldistance="1.7"
        labelangle=0
    ]
}

结果: