Consider:
digraph D {
0[pos="0,0!"]
1[pos="0,5!"]
0 -> 1[label=0.25]
1 -> 0[label=0.50]
}
Rendered under neato
engine , this gives:
Is there a way to increase/control the curvature of the connecting arcs so that the rendering is something like the hand-drawn annotations below:
Edited to add: While I don't have to stick with neato
, it is important in my application that the node pos
coordinate values be upheld.
[there may be better ways, but edges are pretty hard to wrangle]
This solution requires neato -n
(see https://graphviz.org/faq/#FaqDotWithNodeCoords ) and ( https://graphviz.org/docs/attrs/pos/ )
digraph D {
// next 3 lines from the Graphviz FAQ
overlap=false
splines=true
sep=.1
// neato without -n option will just move the half node
// neato -n uses different scale, so use scale attribute to use inches
// neato -n ignores the !, it assumes all node pos values are final
scale=72
0[pos="0,0!"]
1[pos="0,5!"]
// stick an invisible node in the middle, to force the edges out
half [pos="0,2.5!" width=2.5 style=invis]
0 -> 1 [label=0.25]
1 -> 0 [label=0.50]
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.