[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] 3d plot
From: |
Davide Setti |
Subject: |
[igraph] 3d plot |
Date: |
Fri, 19 Jun 2009 16:54:57 +0200 |
Hi all,
i'm playing with the plot method and i don't understand what's the
meaning of the 3d layout algorithms (like fr3d and kk3d). Can i plot
on a PNG? Or can i play with them (e.g. rotate) in a "3d window". If i
try to plot i get:
In [28]: ig.plot(g, layout='kk3d')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/nfsmnt/sra0/sra/setti/<ipython console>
/hardmnt/neyo0/sra/setti/usr/lib64/python2.4/site-packages/igraph/drawing.pyc
in plot(obj, target, bbox, *args, **kwds)
739 cw, ch = bbox.width/60., bbox.height/60.
740 result.add(obj, bbox.contract((cw, ch, cw, ch)), *args, **kwds)
--> 741 if target is None: result.show()
742 if isinstance(target, basestring): result.save()
743 return result
/hardmnt/neyo0/sra/setti/usr/lib64/python2.4/site-packages/igraph/drawing.pyc
in show(self)
396 sur=self._surface
397 ctx=self._ctx
--> 398 if self._is_dirty: self.redraw(ctx)
399
400 self._create_tmpfile()
/hardmnt/neyo0/sra/setti/usr/lib64/python2.4/site-packages/igraph/drawing.pyc
in redraw(self, context)
344 if opacity < 1.0: ctx.push_group()
345 else: ctx.save()
--> 346 plotter(ctx, bbox, palette, *args, **kwds)
347 if opacity < 1.0:
348 ctx.pop_group_to_source()
/hardmnt/neyo0/sra/setti/usr/lib64/python2.4/site-packages/igraph/__init__.pyc
in __plot__(self, context, bbox, palette, *args, **kwds)
1747 layout = Layout(layout)
1748
-> 1749 sl, st, sr, sb = layout.bounding_box()
1750 sw, sh = sr-sl, sb-st
1751 if sw == 0 and sh == 0: sw, sh = 1, 1
ValueError: too many values to unpack
I think igraph is using a 3d bbox (6 dim), so it can't unpack the
array on 4 variables.
Thanks
--
Davide Setti
blog: http://blog.flatlandia.eu
home: http://www.flatlandia.eu
- [igraph] 3d plot,
Davide Setti <=