Question

See the line on the leftmost side of this image.

enter image description here

This isn't a perfect example because the lines don't end on a node, but imagine that there is a node on the bottom left corner of the image. Normally in graphviz if I have a graph like this:

digraph G {
    a->c
    b->c
}

Then I get two separate lines going into c. Is it possible to have these two lines join before they reach c?

Was it helpful?

Solution

Yes, it is possible to have two lines join before they reach c but, as far as I can see, it requires inserting an invisible node to do it. e.g.:

digraph G {
    x [style=invis, height=0, label=""]
    a->x [dir=none]
    b->x [dir=none]
    x->c
}

... which gives:

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top