How can I improve the dot layout of a graphviz graph created in gramps?

Please see this example snippet of a large (500+ node) graph, output from the gramps family tree tool which uses graphviz.

The graph would be much easier to read if the 2 nodes for William Snell were moved to the right of Anne Boleyn, Henry VIII and Elizabeth I, removing 2 unnecessary crossings. There are many similar examples in the output graph where horizontally swapping some of the nodes would significantly reduce the crossings on the plotted graph.

As well as using the built-in graphviz in gramps, I have also got gramps to output a graphviz .gv file, and I've then tried adjusting some of the parameters, e.g. increasing mclimit & searchsize, and replotting using the latest version of graphviz tool, however nothing I try so far improves the layout or changes it in anyway.

Can anyone please suggest how to configure graphviz to do a better job at reducing crossings by reordering the nodes? Alternatively are there hand-edits I could make to the .gv file to achieve this?

One observation is that the overall graph might look better if the nodes were more spread out on rows/ranks where there is plenty of space. I.e. the family tree is dense at the bottom (present day), so nodes fill the entire width of the output, however further back in time there are many less entries in the graph, so there is lots of horizontal space available, however graphviz always seems to want to pack the nodes tightly together. If they were spaced out more, it would be easier to view. Again, does anyone know how to configure graphviz to do this?

Thanks for any suggestions.

Does your graph have any

Does your graph have any cycles? Can you post the basic graph (without images)?

As for getting more space at the bottom, you can try sprinkling varying minlen values on edges along the bottom of the graph.

Recent comments