[graph-tool] Graph drawing: overlay possible?

Tiago de Paula Peixoto tiago at skewed.de
Thu Aug 11 08:52:25 CEST 2011

On 08/09/2011 10:48 AM, Steffen Schaper wrote:
>> The graph_draw() function defaults to 'neato' if the graph is smaller than 1000 nodes, and uses 'sfdp' otherwise. And indeed, it seems like 'sfdp' ignores the pin property. This is a graphviz limitation. 
> Maybe you could add another check to draw/__init__.py at line 312:
> layout = "neato" if g.num_vertices() <= 1000 else "fdp" if pos is not None and pin else "sfdp"

Yes, something like this would be a good idea.

> Thanks, setting maxiter=1 made things faster (subjectively, I haven't
> done timings).  What I meant originally was that the difference
> between sfdp without pin and neato/fdp (I tried both now) with pin
> isn't as big as I thought. My naive expectation was that it takes most
> of the time to do the layout, so if we tell graphviz where to put the
> nodes, the rest should be a lot quicker.

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


Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20110811/07d75591/attachment.asc>

More information about the graph-tool mailing list