chiluf / visvis

Automatically exported from code.google.com/p/visvis
Other
1 stars 0 forks source link

Specifying integer data in 3D plot results in error #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

vv.plot([0,1,1,1],[0,0,1,1],[0,0,0,1])

however, no error for

vv.plot([0,1,1,1.0],[0,0,1,1.0],[0,0,0,1.0])

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\python33\lib\site-packages\visvis\functions\plot.py", line 150, in plot
    l = vv.Line(axes, pp)
  File "c:\python33\lib\site-packages\visvis\core\line.py", line 357, in __init__
    self.SetPoints(points)
  File "c:\python33\lib\site-packages\visvis\core\misc.py", line 209, in newFunc
    retval = function(self, *args, **kwargs)
  File "c:\python33\lib\site-packages\visvis\core\line.py", line 585, in SetPoints
    points = Pointset(handleInvalidValues(points))
  File "c:\python33\lib\site-packages\visvis\core\line.py", line 940, in handleInvalidValues
    values[invalid] = np.inf
OverflowError: cannot convert float infinity to integer

and subsequently, as a result, upon every redraw:

Traceback (most recent call last):
  File "c:\python33\lib\site-packages\visvis\backends\qtcommon.py", line 211, in paintEvent
    self.figure.OnDraw()
  File "c:\python33\lib\site-packages\visvis\core\baseFigure.py", line 773, in OnDraw
    self._Draw(mode)
  File "c:\python33\lib\site-packages\visvis\core\baseFigure.py", line 860, in _Draw
    child._DrawTree(mode, pickerHelper)
  File "c:\python33\lib\site-packages\visvis\core\axes.py", line 123, in _DrawTree
    base.Wibject._DrawTree(self, mode, *args, **kwargs)
  File "c:\python33\lib\site-packages\visvis\core\base.py", line 191, in _DrawTree
    item._DrawTree(mode,pickerHelper)
  File "c:\python33\lib\site-packages\visvis\core\base.py", line 184, in _DrawTree
    self.OnDraw()
  File "c:\python33\lib\site-packages\visvis\core\axes.py", line 842, in OnDraw
    self._OnDrawInMode(DRAW_NORMAL, self.bgcolor)
  File "c:\python33\lib\site-packages\visvis\core\axes.py", line 902, in _OnDrawInMode
    self._OnDrawContent(mode, bgcolor, pos, pickerHelper)
  File "c:\python33\lib\site-packages\visvis\core\axes.py", line 1038, in _OnDrawContent
    item._DrawTree(mode, pickerHelper)
  File "c:\python33\lib\site-packages\visvis\core\base.py", line 184, in _DrawTree
    self.OnDraw()
  File "c:\python33\lib\site-packages\visvis\core\line.py", line 613, in OnDraw
    pp = self._points
AttributeError: 'Line' object has no attribute '_points'

Original issue reported on code.google.com by r.reil...@gmail.com on 10 Jan 2014 at 12:41

GoogleCodeExporter commented 9 years ago
Could you please try with the latest version from the repo? I cannot reproduce 
it and I think we changed something in the handleInvalidValues function.

Original comment by almar.klein@gmail.com on 20 Jan 2014 at 9:57