Reputation: 3032
I want to have branching arrows like this graph:
Here is my current code:
digraph {
splines=curved
a -> b -> c -> d -> e
e -> a [ label=1 ]
e -> f [ label=2 ]
}
Using neato you can see that the arrows don't come from one root:
There is 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 ]
}
But then the e -> a
arrow is too long. And the arrow 2 is still not tangent with arrow 1.
Is there a way to achieve this effect?
Upvotes: 2
Views: 623
Reputation: 56
I figured out an answer that makes it look a bit more perfect.
digraph {
a -> b -> c -> d -> e
e -> joint [ dir=none ]
joint [shape="point", style="filled", label="", width=0, height=0]
a -> joint [ dir=none, label=1 ]
joint -> f [ label=2 ]
}
Upvotes: 0
Reputation: 1813
Here's a tip:
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
}
I doubt if there is a better solution, Graphviz being what it is.
Upvotes: 3