我想要像这样的图表的分支箭头:
这是我当前的代码:
digraph {
splines=curved
a -> b -> c -> d -> e
e -> a [ label=1 ]
e -> f [ label=2 ]
}
使用neato,您可以看到箭头并非来自同一个根:
有a trick to use an invisible joint node
digraph {
splines=curved
a -> b -> c -> d -> e
e -> joint [ dir=none ]
joint [shape="none", label="", width=0, height=0]
joint -> a [ label=1 ]
joint -> f [ label=2 ]
}
但是e -> a
箭头太长了。并且箭头 2 仍然不与箭头 1 相切。
有没有办法达到这样的效果?
最佳答案
这里有一个提示:
digraph {
splines=curved
a -> b -> c -> d -> e
e -> joint [ dir=none ]
joint [shape="none", label="", width=0, height=0]
joint -> a [ label=1 ]
joint -> f [ label=2 ]
a -> f [style=invis] //pull a and f together ~ "tangent" effect
}
我怀疑是否有更好的解决方案,Graphviz 就是这样。
关于graphviz - 如何在 GraphViz 中使用分割箭头?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67986775/