In [5]:
%matplotlib qt
import numpy as np
from mayavi import mlab
Mayavi is a high level plotting library built on tvtk.
Mayavi has a uses mlab for it's higher level plotting functions. The list of plotting functions can be found here. Functions exist for ploting lines, surfaces, 3d contours, points, ect.
Most of the plot types have a built in example found at mlab.test_*
In [6]:
# try one example, figure is created by default
mlab.test_molecule()
Out[6]:
Mayavi has some very useful interactive controls that can be accessed from the GUI. This includes the ability to record changing of parameters.
In [7]:
# clear the figure then load another example
mlab.clf()
mlab.test_flow_anim()
Out[7]:
In [9]:
# create a new figure
mlab.figure('mesh_example', bgcolor=(0,0,0,))
mlab.test_surf()
Out[9]: