[ACCEPTED]-Prevent overlapping records using graphviz and neato-neato

Accepted answer
Score: 52

Well, as with most questions...soon after 3 I posted the I figured out the answer. I 2 needed to add graph [overlap=false]; at the top of the file.

Do 1 it like this:

graph g {
    overlap = false;

    node [shape=record,height=.1];
    /* ... */
Score: 3

Setting overlap to false will work for neato 24 as the community wiki answer says; however, if 23 the graph exhibits any kind of regularity 22 or symmetry, [overlap=false] will often mess it up by jiggling 21 the nodes around to make them not overlap.

Use 20 [overlap=false] as a last resort.

All node overlaps that 19 are outputted from neato can be viewed as 18 occurring because the nodes are too big 17 relative to the edges. You can make any 16 overlaps go away by making the nodes smaller 15 and preserve symmetry in the graph drawing 14 by setting [overlap=scale]. Quoting the Neato user manual:

To improve clarity, it 13 is sometimes helpful to eliminate overlapping nodes 12 or edges. One way to eliminate node overlaps 11 is just to scale up the layout (in terms 10 of the center points of the nodes) as much 9 as needed. This is enabled by setting the 8 graph attribute overlap=scale. This transformation 7 preserves the overall geometric relationships 6 in the layout, but in bad cases can require 5 high scale factors

As the documentation says 4 [overlap=scale] can result in graph drawings that are unacceptably 3 large, but if it does not its output is 2 generally going to be better looking than 1 [overlap=false].

More Related questions