[Top][All Lists]

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

[igraph] general question about python igraph

From: Roberto Pagliari
Subject: [igraph] general question about python igraph
Date: Thu, 28 Jan 2010 14:40:57 -0800

I have two questions regarding the python version of igraph. 

1) Are all functions written for R available for python? looking at the documentation it seems that R has more available functions

2) I tried the following example

from igraph import *

g = Graph.Erdos_Renyi(n=300, m=250)
colors = ["lightgray", "cyan", "magenta", "yellow", "blue", "green", "red"]
for component in g.components():
  color = colors[min(6, len(component)-1)]
  for vidx in component: g.vs[vidx]["color"] = color
plot(g, layout="fr", vertex_label=None)

taken from the documentation, but I get the error

python firstplot.py 
Traceback (most recent call last):
  File "firstplot.py", line 9, in <module>
    plot(g, layout="fr", vertex_label=None)
  File "/Library/Python/2.5/site-packages/igraph/drawing.py", line 738, in plot
    result = Plot(target, bbox)
  File "/Library/Python/2.5/site-packages/igraph/drawing.py", line 222, in __init__
    self._surface_was_created=not isinstance(target, cairo.Surface)
  File "/Library/Python/2.5/site-packages/igraph/drawing.py", line 51, in __getattr__
    raise TypeError, "plotting not available"
TypeError: plotting not available
bobs-imac:exampleR roberto$ 

Do I need to install anything else?

Many Thanks


reply via email to

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