Hello,
I
am struggling with the plot() function in python-igraph on Ubuntu
12.04. I wish to get a graph like the one attached with the plot
function (this has been created by igraph plot itself so I know it can
be done).
I have installed igraph 0.7 and also PyCairo
address@hidden:~$ sudo apt-get install python-cairo
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-cairo is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
In the ipython shell:
In [1]: import igraph, cairo
In [2]: from igraph, cairo import *
File "<ipython-input-2-f56545cfa77e>", line 1
from igraph, cairo import *
^
SyntaxError: invalid syntax
In [3]: from igraph import *
In [4]: from cairo import *
In [5]: g = Graph([(0,1), (1,2), (0,2)])
In [6]: summary(g)
IGRAPH U--- 3 3 --
In [7]: plot(g)
Out[7]: <igraph.drawing.Plot at 0xb56a014c>
In [8]:
So here, I can see that a Plot object has been created but how do I view it? Shouldn't it give a graphic visualisation as well?
Please help me, as this part is crucial for my project and I have been struggling a while.
Thanks in advance.
--
Regards,
Stuti Rastogi