【问题标题】:In Graphviz, how do I add a shape in the middle of an edge?在 Graphviz 中,如何在边缘中间添加形状?
【发布时间】:2019-09-25 17:09:03
【问题描述】:

我已经用红色标注了下面的图来说明我想要达到的效果:

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

【问题讨论】:

    标签: graphviz


    【解决方案1】:

    您可以通过找到合适的 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
        ]
    }
    

    结果:

    【讨论】:

      猜你喜欢
      • 2010-12-20
      • 1970-01-01
      • 2011-09-07
      • 2023-03-22
      • 2020-09-06
      • 2013-07-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多