Hi Neil, Neil Crighton wrote: > Upgrading to Ubuntu 8.10 has finally fixed the Intel driver issue I > had with Mayavi, so now I'm playing around with the mlab functions. > They're very easy to use, and mean I don't need to create VTK input > files from my data, a step that previously put me off using Mayavi. > Thanks for your work on the mlab functions and the rest of Mayavi!
Thanks! > 1. Is there a way to save the data from the visualization to a VTK > file format? (As a StructuredGrid, UnStructuredGrid, or whatever) I would recommend upgrading to Mayavi-3.0.3 from Gael's ubuntu packages: https://launchpad.net/~gael-varoquaux/+archive If you use this version, you can save the output of a filter to a VTK file by right clicking on the filter. As regards a module, it is not as straightforward and would take some coding on your part to figure out what exactly you want to save from the particular module. A specific question would help us provide a clearer answer. Anyway, with your current Mayavi version, the following will work, let x be your VTK dataset that you want to save (that is the output of some VTK filter/whatever): from enthought.tvtk.api import write_data write_data(x, 'foo.xml') # or 'foo.vtu'/'foo.vts' etc. > 2. I'd like to plot a 3-d distribution of points with points3d() > colouring glyphs based on one point property and sizing glyphs based > on another property. I can give a single scalar array that's used to > choose the colour *and* glyph size, but I want to give 2 scalar > arrays, one for the size and another for the colour. Is this > possible? It would also be great if I could control the opacity with > yet another scalar array. This is not easy to do with the way mayavi modules are currently setup. It may be fixed later on. However, what you can do is scale/orient the glyphs using vectors and color by the scalars. This should solve your problem. Unfortunately, I don't think you set the opacity using yet another scalar -- at least I am not sure how best to do it. You could find a function relating the sclalar value to the opacity and then tailor the LUT so it does what you need. You can manipulate the LUT relatively easily and even set the colors via numpy arrays. This can be done by setting the lut's table trait. Basically with Python scripts you can do pretty much what you want. > 3. Is there any way to control the tick positions on the axes drawn > using mlab.axes()? Unfortunately, not. You can create 3 separate axes for 3 different coordinates if you want but apart from that there isn't much control. cheers, prabhu ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MayaVi-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mayavi-users
