This page is my small collection of tips and tricks harvested from the MayaVi users mailing list.
Hans Fangohr has posted a short comparison of MayVI and OpenDX.
In [1]: import mayavi
In [2]: v = mayavi.mayavi ()
In [3]: v.load_visualization('cvs/mayavi/examples/heart.mv')
In [4]: v.renwin.save_png('/tmp/test.png')
Credit: Prabhu Ramachandran and Fernando Perez (see original thread).
import mayavi
v = mayavi.mayavi ()
v.load_visualization ('examples/heart.mv')
dvm = v.get_current_dvm()
mm = dvm.get_current_module_mgr ()
slh = mm.get_scalar_lut_handler ()
slh.legend_on.set(1)
slh.legend_on_off ()
You can turn the legend off using
# turn off legend slh.legend_on.set(0) slh.legend_on_off ()
Credit: Fernando Perez and Prabhu Ramachandran (can't find original thread in archive).
CF> Well, it sort of works on the debian machine, except that the
CF> heart disappears after it is loaded, leaving just the grid and
CF> axes. On the redhat machine, I still get the LutHandler.py
CF> ValueError.
Yes, the actor disappears from time to time due to a bug in Mesa. I
believe Mesa 4.x should not have this problem. Alternatively, if you
use an nVidia card then you will use their OpenGL libs which dont have
this bug.
(1) To get around the problem for now click on the "configure data"
button and click the re-read data option. This should make verything
re-appear.
(2) Use the unstable version of MEsa i.e. 3.4.2 or better still
install xlibmesa instead of mesa. This is a later version than
testings Mesa and might make things a little more tolerable.
Credit: Prabhu Ramachandran (original thread).