Date: Fri, 20 Nov 2009 17:56:24 +0000 From: Tamas Nepusz
<address@hidden> Subject: Re: [igraph] Panel Plot Using Igraph
Python Bindings To: Help for igraph users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
> Can anyone give me a hint (or even better even a simple 2 by 2
> example showing 4 network plots in the same pdf)?
This can be done by using the Plot object and its methods directly
instead of the convenience function called plot(). Here's an example
that produces a 4 x 3 plot of 11 isomorphism classes:
#!/usr/bin/env python
from igraph import *
width, height = 1000, 750
ncols, nrows = 4, 3
w, h = width / ncols, height / nrows
p = Plot(bbox=(width, height))
for i in xrange(11):
ri, ci = i / ncols, i % ncols
g = Graph.Isoclass(4, i)
bbox = (ci*w, ri*h, ci*w+w, ri*h+h)
p.add(g, bbox=bbox, margin=20, layout="fr")
p.show()
-- Tamas