0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---------------------------------------------------------------------------
TraitError Traceback (most recent call last)
<ipython-input-3-42a87c9af16c> in <module>()
29 return mlab.screenshot(antialiased=True)
30
---> 31 animation = mpy.VideoClip(make_frame, duration=duration)
32 animation.write_gif("new_fig.gif", fps=20)
/anaconda/envs/py27/lib/python2.7/site-packages/moviepy/video/VideoClip.pyc in __init__(self, make_frame, ismask, duration)
98 if make_frame is not None:
99 self.make_frame = make_frame
--> 100 self.size =self.get_frame(0).shape[:2][::-1]
101 self.ismask = ismask
102 if duration is not None:
/anaconda/envs/py27/lib/python2.7/site-packages/moviepy/Clip.pyc in get_frame(self, t)
75 """
76 # Coming soon: smart error handling for debugging at this point
---> 77 return self.make_frame(t)
78
79 def fl(self, fun, apply_to=[] , keep_duration=True):
<ipython-input-3-42a87c9af16c> in make_frame(t)
26 def make_frame(t):
27 mlab.clf() # clear the figure (to reset the colors)
---> 28 mlab.points3d(xs[t],ys[t],zs[t],color='blue', figure=fig_myv)
29 return mlab.screenshot(antialiased=True)
30
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/helper_functions.pyc in the_function(*args, **kwargs)
35
36 def the_function(*args, **kwargs):
---> 37 return pipeline(*args, **kwargs)
38
39 if hasattr(pipeline, 'doc'):
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/helper_functions.pyc in __call__(self, *args, **kwargs)
80 scene.disable_render = True
81 # Then call the real logic
---> 82 output = self.__call_internal__(*args, **kwargs)
83 # And re-enable the rendering, if needed.
84 if scene is not None:
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/helper_functions.pyc in __call_internal__(self, *args, **kwargs)
175 if scale_factor == 'auto':
176 kwargs['scale_factor'] = 1
--> 177 g = Pipeline.__call_internal__(self, *args, **kwargs)
178 if scale_factor == 'auto':
179 g.glyph.glyph.scale_factor = \
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/helper_functions.pyc in __call_internal__(self, *args, **kwargs)
93 # Copy the pipeline so as not to modify it for the next call
94 self.pipeline = self._pipeline[:]
---> 95 return self.build_pipeline()
96
97 def store_kwargs(self, kwargs):
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/helper_functions.pyc in build_pipeline(self)
121 if key in keywords:
122 this_kwargs[key] = value
--> 123 object = pipe(object, **this_kwargs)._target
124 return object
125
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/modules.pyc in __init__(self, *args, **kwargs)
154
155 def __init__(self, *args, **kwargs):
--> 156 super(DataModuleFactory, self).__init__(*args, **kwargs)
157 # We are adding data to the scene, reset the zoom:
158 scene = self._scene.scene
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/pipe_base.pyc in __init__(self, parent, **kwargs)
161 # Now calling the traits setter, so that traits handlers are
162 # called
--> 163 self.set(**traits)
164 if scene is not None:
165 scene.disable_render = not self._do_redraw
/anaconda/envs/py27/lib/python2.7/site-packages/mayavi/tools/pipe_base.pyc in set(self, trait_change_notify, **traits)
169 unless trait_change_notify==False"""
170 HasPrivateTraits.set(self, trait_change_notify=trait_change_notify,
--> 171 **traits)
172 if trait_change_notify == False:
173 return
/anaconda/envs/py27/lib/python2.7/site-packages/traits/util/deprecated.pyc in wrapper(*args, **kw)
30
31 warnings.warn(message, DeprecationWarning, stacklevel=2)
---> 32 return fn(*args, **kw)
33
34 return wrapper
/anaconda/envs/py27/lib/python2.7/site-packages/traits/has_traits.pyc in set(self, trait_change_notify, **traits)
1550 def set ( self, trait_change_notify = True, **traits ):
1551 return self.trait_set(
-> 1552 trait_change_notify=trait_change_notify, **traits)
1553
1554 set.__doc__ = trait_set.__doc__
/anaconda/envs/py27/lib/python2.7/site-packages/traits/has_traits.pyc in trait_set(self, trait_change_notify, **traits)
1542 else:
1543 for name, value in traits.items():
-> 1544 setattr( self, name, value )
1545
1546 return self
/anaconda/envs/py27/lib/python2.7/site-packages/traits/trait_handlers.pyc in error(self, object, name, value)
170 """
171 raise TraitError( object, name, self.full_info( object, name, value ),
--> 172 value )
173
174 def full_info ( self, object, name, value ):
TraitError: The 'color' trait of a GlyphFactory 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) or None, but a value of 'blue' <type 'str'> was specified.