On Friday 25 February 2011 11:00 PM, Michele Mattioni wrote: > Hello, > > I'm managing to show the info from two scalars, following the example > of the electronic orbital, however I would like to change the second > scalar in an interactive way. > > I've read the doc about animation: > http://github.enthought.com/mayavi/mayavi/mlab.html#animating-the-data > > but unfortunaly the only scalar I can get hold is the d, meanwhile I'm > interested in second_scalar > > Is there a way to change it or to get hold of that scalar, without > blowing the memory?
Can't you simply change scalars directly? For example with your code, this works for me:: arr = dataset.point_data.get_array(array_id) arr[2] = 100 ms.m_data.update() Updating the scalar may or may not work but if it doesn't, do this:: s = arr.to_array() s[2] = 1000 ms.m_data.update() cheers, prabhu ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users