igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Panel Plot Using Igraph Python Bindings


From: Tamas Nepusz
Subject: Re: [igraph] Panel Plot Using Igraph Python Bindings
Date: Fri, 20 Nov 2009 17:56:24 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]