igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: Panel Plot Using Igraph Python Bindings


From: Lorenzo Isella
Subject: [igraph] Re: Panel Plot Using Igraph Python Bindings
Date: Mon, 23 Nov 2009 16:54:29 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)


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

Hello,
Well, now I can import igraph as a Python module without any error (both under Ubuntu 9.10 and debian testing, 64 bit architecture), but I cannot run your example (which I saved to test_plot.py).
Here is what happens (on both platforms)

$ ./test_plot.py
Segmentation fault

No idea of what is going on...
Any help is appreciated
Cheers

Lorenzo



reply via email to

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