FaqRuntimeNeato

 

Neato runs forever on a certain example.

First, how big is your graph? Neato is a quadratic algorithm, roughly equivalent to statistical multidimensional scaling. If you feed it a graph with thousands of nodes and edges, it can easily take hours or days. The first thing to check is to run neato -v to get a trace of the output. If the numbers you see are generally getting smaller, the layout is just taking a long time. You can set certain parameters, such as epsilon or maxiter to shorten the layout time, at the expense of layout quality. But if your graph is big, who's going to notice?

If you see the numbers repeating, or fluctuating up and down, then neato is cycling, especially if your graph is small. This should never happen by default for versions later than 1.13. If it does, please report it as a bug.

If you are using an earlier version of neato, or you used mode=KK, cycling is indeed possible. This cycling is very sensitive to the initial layout. By using the start attribute, for example,

  • neato -Gstart=3
    neato -Gstart=rand

the cycling will most likely disappear. Or you can employ the parameters used for large graphs to stop the layout earlier:

  • neato -Gepsilon=.01
    neato -Gmaxiter=500

Note that, if you have a large graph, the generation of edges as splines is a cubic algorithm, so you would do well to avoid using splines=true. (This commment applies to circo, fdp and twopi as well.)

GraphvizWiki: FaqRuntimeNeato (last edited 2008-01-17 18:20:56 by H-135-207-131-158)

Recent comments