[graph-tool] Graph drawing: overlay possible?

Steffen Schaper steffen.schaper at physics.ox.ac.uk
Mon Aug 8 16:20:48 CEST 2011


I am quite new to graph-tool and mostly use it for drawing at the moment.
Thanks Tiago for all the great work you put into graph-tool!

Apologies for hijacking this thread - I hope this okay as my question is
basically the same that Sebastian had.

Tiago Peixoto wrote:
>> Theses colors would need to be transparent and the graph layout must
>> match in each drawing.
> Transparent colors are no problem, as well as matching the layout (you
> just need to pass the 'pos' parameter, and set 'pin=True' so that the
> positions remain fixed).

That's exactly what I tried, but for me, every time I call gt.graph_draw, I
get a new layout.

Here's my code:

#create network and properties...
#first plot. this works fine
positions = gt.graph_draw(network, vcolor=colorProperties, vcmap=colorMap,
vnorm=False, vorder=plotOrder, output='out0.png')

# change a few values in colorProperties and plotOrder

# now draw again

However, what happens is that the graph gets a new layout which is distinct
from the first one. Is there something I missed? I also tried to add
vprops={'pin':'True} to the second call of graph_draw, but that didn't help

I'm on Ubuntu 11.04, graph-tool version 2.2.14 (commit 39b848dc, Sat Jul 9
00:53:56 2011 +0200) [from ppa], graphviz version 2.26.3.


View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Graph-drawing-overlay-possible-tp2742337p3235693.html
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.

More information about the graph-tool mailing list