On 09/08/11 01:34, Tiago de Paula Peixoto wrote:
Strange, I cannot reproduce this at all... For me, I
get always the same
What version of graphviz do you have insalled?
I'm on version 2.26.3 (20100126.1600) - the one in the Ubuntu Natty repos.
On 09/08/11 01:48, Tiago de Paula Peixoto 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.
you could add another check to draw/__init__.py at line 312:
layout = "neato" if g.num_vertices() <= 1000 else "fdp" if pos is
None and pin else "sfdp"
Unfortunately, graphviz gives very little control on
the total canvas
size, and likes to crop things. I find it very annoying, but I don't
know how to force graphviz to do the right thing.
At least when I set the canvas
size for neato with size=(15,15), I
always get the same size in the end.
One thing that
suprised me is that pinning doesn't make things any
faster. My network has almost 10000 nodes - does it really take most
of the time to create output rather than performing the actual layout?
I notice a
_huge_ difference when running 'neato' with pinning
vs. without. But maybe you can improve things further by limiting the
total number of iterations with the 'maxiter' parameter.
maxiter=1 made things faster (subjectively, I haven't
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