Suppose we have the following simple graph:
digraph Test {
Start[shape = doublecircle];
Foo[shape = square];
Bar[shape = diamond];
Baz[shape = square];
Xyz[shape = square];
Start -> Foo;
Foo:s -> Bar:n;
Bar:w -> Baz:n;
Bar:e -> Xyz:n;
Baz:s -> Foo:n;
}
Which is rendered as follows:
Is there a way to tell graphviz to draw edge Baz -> Foo
without intersections with Foo -> Bar
nor Bar -> Baz
?
when it comes to graphviz layout, the best you can do is trying as much as possible to not interfere :)
taking out compass_pt from your file:
digraph Test {
Start[shape = doublecircle];
Foo[shape = square];
Bar[shape = diamond];
Baz[shape = square];
Xyz[shape = square];
Start -> Foo;
Foo -> Bar;
Bar -> Baz;
Bar -> Xyz;
Baz -> Foo;
}
and you get:
Adding an invisible node should do the trick:
digraph Test {
Start[shape = doublecircle];
Foo[shape = square];
Bar[shape = diamond];
Baz[shape = square];
Xyz[shape = square];
// "invisible" node to connect baz to foo
BazToFoo [shape=none, label="", height=0, width=0]
Start -> Foo;
Foo:s -> Bar:n;
Bar:w -> Baz:n;
Bar:e -> Xyz:n;
Baz:s -> BazToFoo [dir=none] // remove the arrowhead
BazToFoo -> Foo:n;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With