Mayavi visualizes scalar, vector, and tensor scientific data in 2D and 3D via a GUI, Python scripting, and the mlab API on top of VTK.
Overview
Mayavi targets easy, interactive visualization of three-dimensional scientific data in Python. It offers an optional rich interface with dialogs, a scripting interface including one-liners and object-oriented APIs, and uses the VTK toolkit without requiring deep VTK expertise. It can run as the mayavi2 standalone application, embed as an Envisage plugin, or serve as a visualization engine inside other applications.
Features include 2D and 3D plots for scalar, vector, and tensor fields, custom sources and filters, multiple file formats such as VTK and PLOT3D, saving scenes and rendered images, and rapid plotting through mlab. Unlike the older MayaVi1 line, it emphasizes scriptability and extensibility from the ground up.
Installation typically uses pip with VTK and a GUI toolkit such as PySide6, PyQt6, or wxPython; VTK wheels cover major desktop platforms. Optional Jupyter notebook integration is available via nbextension install commands after suitable dependencies are present.
Mayavi is part of the Enthought Tool Suite and integrates with wxPython, Qt, Traits-based dialogs, and notebook environments for off-screen rendering and embedding workflows described in its user guide.
Key features
- 3D and 2D scientific data plots
- Interactive mayavi2 application
- Python and mlab scripting API
- VTK-based pipeline without manual VTK
- Custom sources, modules, and filters
- VTK and PLOT3D file readers
- Embeddable Envisage plugin mode
- Jupyter notebook extension support
Use cases
- Exploring volumetric simulation output
- Vector and tensor field visualization
- Embedding 3D views in Python apps
- Scripted scientific plotting with mlab
- Qt or wxPython integrated scenes