Graphviz splines=false has no effect on undirected graph with bi-directional a — b/b — a edges
Question
I am drawing an undirected graph with Graphviz that has redundant edges, (e.g. A -- B and B -- A). I would like to see only one line between the two vertices, regardless of whether there is a redundant reverse edge in the data. My question is, is there a way to do this with Graphviz, without having to use some other tool/code first to remove the redundant edges? I have tried graph [splines=false];
without any success. Below is a minimal example:
graph G {
graph [splines=false];
node [shape=point];
a -- b;
b -- a;
}
And the output:
What I want as output is:
despite the redundant edges that may exist in the specified graph.
Solution
Try "strict graph G { ... }"
A strict graph or digraph disallows parallel edges.
Stephen North north@graphviz.org
OTHER TIPS
You may try setting nodesep
to 0 :
... this affects the spacing between loops on a single node, or multiedges between a pair of nodes.
Not sure if nodesep is completely set to 0, because in the documentation the minimum value indicated is 0.02. A quick test seems to be ok, though.