Search code examples
graph-theorygraphviz

graphviz with combined edges


I'm looking for a way to achieve something like this in graphviz:

          --- node B 
          |
node A ---
          |
          --- node C

another example (at the bottom): http://machining.grundfos.de/media/60727/grundfos_pumpenhandbuch.pdf#23

Is there a way of doing that with graphviz?

so far I only got orthogonal edges:

digraph G {
 graph [rankdir=LR,splines=ortho,concentrate=true];
 node [shape=box,];
 edge [dir=none];

 a -> b;
 a -> c;
}

Solution

  • you must introduce intermediate (eventually hidden) nodes to act as split points. For instance:

    digraph G {
     graph [rankdir=LR,splines=ortho,concentrate=true];
     node [shape=box,];
     edge [dir=none];
     i [shape=point];
     a -> i -> b;
     a -> i -> c;
    }
    

    yields

    enter image description here