igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] plotting with igraph


From: Gábor Csárdi
Subject: Re: [igraph] plotting with igraph
Date: Sat, 4 Sep 2010 15:31:34 +0200

Hello,

the page that you quote says:

"Important: To follow the examples of this subsection, you need the
Python bindings of the Cairo library. The previous chapter (Installing
igraph) tells you more about how to install Cairo’s Python bindings."

Gabor


On Sat, Sep 4, 2010 at 9:11 AM, Luc Quoniam <address@hidden> wrote:
> 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
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM



reply via email to

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