On Thu, Sep 30, 2010 at 23:04, Geoffrey Irving <irv...@naml.us> wrote: > On Fri, Oct 1, 2010 at 11:39 AM, Robert Kern <robert.k...@gmail.com> wrote:
>> s = mlab.pipeline.triangular_mesh_source(x,y,z,triangles) >> s.data.cell_data.scalars = .... # Your data here. >> surf = mlab.pipeline.surface(s) >> surf.contours.filled_contours = True > > Cool, that seems to work for static plots (with "contours" replaced > with "contour"). However, it breaks dynamic updates if I change data > interactively on trait changes. For vertex data, I'm using the > following code for interactive updates: > > �...@on_trait_change('threshold') > def update_plot(self): > self.plot.mlab_source.set(scalars=self.scalars()) > > borrowed from > > > http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_mlab_interactive_dialog.html#example-mlab-interactive-dialog > > where plot is generated with triangular_mesh(). How do I force an > update of the surface if I generate it myself and use cell data? surf.render() -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion