{Mayavi} Random points in a cube
Hello,
Any ideas why I can't change color of the points?
I[1]: from enthought.mayavi import mlab
I[2]: r = np.random.uniform(0,5,size=[3,1,300])
I[3]: mlab.points3d(r[0],r[1],r[2], scale_factor=0.5)
O[3]: <enthought.mayavi.modules.glyph.Glyph object at 0xc48774c>
I[4]: ---------------------------------------------------------------------------
TraitError Traceback (most recent call last)
/home/gsever/Desktop/python-repo/ETS_3.3.1/TraitsBackendWX_3.2.1/enthought/traits/ui/wx/color_editor.pyc in color_selected(self, event)
140 color = event.GetColour()
141 try:
--> 142 self.value = color
143 except ValueError:
144 pass
/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1/enthought/traits/ui/editor.pyc in _set_value(self, value)
240 def _set_value ( self, value ):
241 if self.name != 'None':
--> 242 self.ui.do_undoable( self.__set_value, value )
243
244 def __set_value ( self, value ):
/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1/enthought/traits/ui/ui.pyc in do_undoable(self, action, *args, **kw)
707 self._undoable = self.history.now
708
--> 709 action( *args, **kw )
710 finally:
711 if undoable == -1:
/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1/enthought/traits/ui/editor.pyc in __set_value(self, value)
253 getattr( handler, '%s_setattr' % name, None ) or
254 getattr( handler, 'setattr' ))
--> 255 method( self.ui.info, self.object, name, value )
256 except TraitError, excp:
257 self.error( excp )
/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1/enthought/traits/ui/handler.pyc in setattr(self, info, object, name, value)
274
275 """
--> 276 setattr( object, name, value )
277
278 #---------------------------------------------------------------------------
/home/gsever/Desktop/python-repo/ETS_3.3.1/Traits_3.2.1/enthought/traits/trait_handlers.pyc in error(self, object, name, value)
173 """
174 raise TraitError( object, name, self.full_info( object, name, value ),
--> 175 value )
176
177 def arg_error ( self, method, arg_num, object, name, value ):
TraitError: The 'color' trait of a CameraLight instance must be a tuple of the form: (0.0 <= a floating point number <= 1.0, 0.0 <= a floating point number <= 1.0, 0.0 <= a floating point number <= 1.0), but a value of wx.Colour(226, 37, 37, 255) <class 'wx._gdi.Colour'> was specified.
Trying to set the foreground via the GUI yields similar result:
TraitError: The 'foreground' trait of a MayaviScene instance must be a tuple of the form: (0.0 <= a floating point number <= 1.0, 0.0 <= a floating point number <= 1.0, 0.0 <= a floating point number <= 1.0), but a value of wx.Colour(255, 255, 255, 255) <class 'wx._gdi.Colour'> was specified.
Should be rev_25196
https://svn.enthought.com/svn/enthought/Mayavi/trunk
This is Fedora 12
Linux ccn 2.6.31.9-174.fc12.i686.PAE #1 SMP Mon Dec 21 06:04:56 UTC 2009 i686 i686 i386 GNU/Linux
Thanks
--
Gökhan
_______________________________________________ Enthought-Dev mailing list Enthought-Dev@... https://mail.enthought.com/mailman/listinfo/enthought-dev
RSS Feed