Mike M
Mike M

Reputation: 2313

Graphviz: Distance between edge and by passed nodes with neato

Layout engine is neato. I would like to have some more space between the arrow from a to c and the node b. margin and pad don't help with neato. This is my graph:

digraph G {
  splines=true      

  a [pos="0.0,0.0!"];
  b [pos="0.0,1.0!"];
  c [pos="0.0,2.0!"];  

  a -> b;
  a -> c;
  b -> c;
}

Current graph

Is that possible?

Upvotes: 10

Views: 8768

Answers (2)

rob99985
rob99985

Reputation: 157

Assuming this was solved (or irrelevant now!) given how old it is but you can attach a minus to esep (i.e. esep = -0.4) and that brings the nodes closer together.

Upvotes: 2

Toryu
Toryu

Reputation: 635

Taking your original graph definition, adding a esep=1 attribute to obtain the following:

digraph G {
  splines=true; esep=1;


  a [pos="0.0,0.0!"];
  b [pos="0.0,1.0!"];
  c [pos="0.0,2.0!"];  

  a -> b;
  a -> c;
  b -> c;
}

will output the following with neato:

Output with added <code>esep</code> attribute

As per the documentation for that attribute:

Margin used around polygons for purposes of spline edge routing. The interpretation is the same as given for sep. This should normally be strictly less than sep.

Upvotes: 10

Related Questions