igraph-help
[Top][All Lists]
Advanced

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

[igraph] plotting with igraph


From: Luc Quoniam
Subject: [igraph] plotting with igraph
Date: Sat, 04 Sep 2010 09:11:28 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2

Hello,

Novice in programming Python... New user in igraph...Windows7 32 computer...

A lot of defect indeed!!

I applied exactly http://www.cs.rhul.ac.uk/home/tamas/development/igraph/tutorial/tutorial.html#layouts-and-plotting

Nearly everything respond all-right... except the plot option...
In Python interface I get the message. 

Traceback (most recent call last):
  File "C:\Python26\Lib\SITE-P~1\PYTHON~1\pywin\framework\scriptutils.py", line 322, in RunScript
    debugger.run(codeObject, __main__.__dict__, start_stepping=0)
  File "C:\Python26\Lib\SITE-P~1\PYTHON~1\pywin\debugger\__init__.py", line 60, in run
    _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
  File "C:\Python26\Lib\SITE-P~1\PYTHON~1\pywin\debugger\debugger.py", line 655, in run
    exec cmd in globals, locals
  File "C:\User\Vlab4u\igraph\premier.py", line 10, in <module>
    plot(g, layout = layout)
  File "C:\Python26\lib\site-packages\igraph\drawing.py", line 738, in plot
    result = Plot(target, bbox)
  File "C:\Python26\lib\site-packages\igraph\drawing.py", line 222, in __init__
    self._surface_was_created=not isinstance(target, cairo.Surface)
  File "C:\Python26\lib\site-packages\igraph\drawing.py", line 51, in __getattr__
    raise TypeError, "plotting not available"
TypeError: plotting not available

and no plot.. of course... My Python script is exactly the suggested in tutorial

import igraph
from igraph import *
g = Graph([(0,1), (0,2), (2,3), (3,4), (4,2), (2,5), (5,0), (6,3), (5,6)])
g.vs
g.vs["name"] = ["Alice", "Bob", "Claire", "Dennis", "Esther", "Frank", "George"]
g.vs["age"] = [25, 31, 18, 47, 22, 23, 50]
g.vs["gender"] = ["f", "m", "f", "m", "f", "m", "m"]
g.es["is_formal"] = [False, False, True, True, True, False, True, False, False]
layout = g.layout("kk")

Could you help me?? Where is the mistake??

Best regards

reply via email to

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