Dan Q
Dan Q

Reputation: 2257

How to increase space between edges (splines) and nodes in graphviz?

I manually specified the starting position of every node and set splines=true.

The resulting image appears as follows:

graph

The spline between 1031 and 1028 appears to touch nodes 1030 and 1029. I am just wondering if there's a way to increase the margin here. I have tried specifying esep="+3,3" to give a very high margin around nodes but the same graph is still output.

Upvotes: 12

Views: 4434

Answers (3)

sroush
sroush

Reputation: 6773

sep & esep are graph-level, used to position all the nodes, but you are explicitly doing the positioning, so *sep & *esep will probably be ignored.
Instead, try adding one or more "duplicate" edges from 1031 to 1028, each in a different color, then make all the inner (too close) edges invisible.

Upvotes: 0

tiffon
tiffon

Reputation: 5040

There are also esep and sep graph attributes.

From what I have observed, these attributes work very well when using neato to generate spline edges when positions are known. But, if set to a value that is too high, the output positions do not match the input positions, at all.

Upvotes: 0

blahdiblah
blahdiblah

Reputation: 34011

As you're laying out the nodes by hand, why not lay out the spline by hand as well with:

pos splineType

Splines are somewhat more complex to position than nodes, but not terribly so.

To get started, run your graph through neato with the output format set to 'dot' (-Tdot) and it will generate the lower-level layout. Then you can adjust the coordinates for the problem spline.

Upvotes: 2

Related Questions