On 11/08/11 08:52, Tiago de Paula Peixoto wrote:
Although the difference between sfdp and fdp/neato is very noticeable for larger graphs, I would expect that both fdp/neato with pin=True would be _much_ faster than sfdp, since the layout algorithm is not run. In my experience, this is always what I found. I would be interested in understanding why you perceive this not to be the case... How long does it actually take to plot with sfdp and neato with pinning?
I've just done a few timings using layout='neato' (or layout='fdp'),pos=positions,pin=True,maxiter=0. This takes about 11 seconds for my network. I had used maxiter=1 earlier, and that made neato a lot slower (more than a factor of 2) while fdp's performance didn't change much. sfdp takes about 15 seconds. In all cases, I specified vcolor, vcmap and vorder. So you're completely right: neato/fdp are a lot faster given the layout and the right arguments.
I also experimented with matplotlib - given that I got the positions out of graph-tool/graphviz, the rest can also be done there. The speed is a little better there - it takes just under 10 seconds. Also, I want to do many plots with the same layout (just different vertex colours), so I think matplotlib is more convenient for me. I can plot the network once and afterwards only draw the vertices whose colour changes, and then use imagemagick/composite to do the overlay.
Cheers, Steffen