Skip to main content

Mayavi docs: https://mayavi.readthedocs.io/en/latest/ TVTK docs: https://tvtk.readthedocs.io/en/latest/

Package on PyPI BSD 3 Clause

Vision

Mayavi seeks to provide easy and interactive visualization of 3D data. It does this by the following:

  • an (optional) rich user interface with dialogs to interact with all data and objects in the visualization.

  • a simple and clean scripting interface in Python, including one-liners, a-la mlab, or object-oriented programming interface.

  • harnesses the power of the VTK toolkit without forcing you to learn it.

Additionally Mayavi strives to be a reusable tool that can be embedded in your applications in different ways or combined with the envisage application-building framework to assemble domain-specific tools.

Mayavi is part of the Enthought Tool Suite (ETS).

Features

Mayavi is a general purpose, cross-platform tool for 2-D and 3-D scientific data visualization. Its features include:

  • Visualization of scalar, vector and tensor data in 2 and 3 dimensions

  • Easy scriptability using Python

  • Easy extendability via custom sources, modules, and data filters

  • Reading several file formats: VTK (legacy and XML), PLOT3D, etc.

  • Saving of visualizations

  • Saving rendered visualization in a variety of image formats

  • Convenient functionality for rapid scientific plotting via mlab (see mlab documentation)

  • See the Mayavi Users Guide for more information.

Unlike its predecessor MayaVi1, Mayavi has been designed with scriptability and extensibility in mind from the ground up. While the mayavi2 application is usable by itself, it may be used as an Envisage plugin which allows it to be embedded in user applications natively. Alternatively, it may be used as a visualization engine for any application.

Quick start

If you are new to Mayavi it is a good idea to read the online user manual which should introduce you to how to install and use it.

If you have installed Mayavi as described in the next section, you should be able to launch the mayavi2 application and also run any of the examples in the examples directory.

Installation

By itself Mayavi is not a difficult package to install but its dependencies are unfortunately rather heavy. However, many of these dependencies are now available as wheels on PyPI. The two critical dependencies are,

  1. VTK >= 9.0

  2. A GUI toolkit, either PySide6, PyQt6, or wxPython.

The latest VTK wheels are available on all the major platforms (Windows, MacOS, and Linux). If you are out of luck, and your platform is not supported then you will need to install VTK yourself using your particular distribution as discussed in the General Build and Installation instructions.

If you have trouble installing the Mayavi wheels, you can install the old way from the source distribution and your current VTK version with:

$ pip install --no-binary=mayavi --no-build-isolation mayavi

Currently, Mayavi itself should work with the new wxPython 4.x. However, traitsui, pyface, and other ETS packages do not yet support it so the UI will not work correctly. Older versions should work. PyQt6 and PySide6 should work out of the box.

Latest stable release

As of the latest release, i.e. 4.6.0 and above, if you are using Python 3.x and are on a 64 bit machine, installation via pip is the easiest and is as follows:

$ pip install mayavi
$ pip install PySide6

Thats it!

If you are unable to do this, read the documentation above and find a way to install VTK and a suitable UI toolkit and then repeat the above.

If you are interested in the jupyter notebook support as well, do the following (after ensuring that you have jupyter installed of course. Note, the Jupyter notebook function is only supported starting mayavi version 4.5.0):

$ jupyter nbextension install --py mayavi --user
$ jupyter nbextension enable --py mayavi --user

You will also need to have ipywidgets and ipyevents installed. These can be installed via pip or your favorite package manager.

Bleeding edge

If you want to install the latest version of Mayavi from github, you can simply do the following:

$ git clone https://github.com/enthought/mayavi.git
$ cd mayavi
$ pip install PySide6  # replace this with any supported toolkit
$ pip install -v .  # or -e for editable install

Add the jupyter nbextensions using the instructions in the section above and you should be good to go.

Documentation

More documentation is available in the online user manual or in docs directory of the sources. This includes a man page for the mayavi2 application, a users guide in HTML and PDF format and documentation for mlab.

More documentation in the form of workshop/tutorial material is available here:

Tutorial Videos

Here are some tutorial videos that you can watch to learn Mayavi:

Examples

Examples are all in the examples directory of the source or the git clone. The docs and examples do not ship with the binary eggs. The examples directory also contains some sample data.

Test suite

The basic test suites for tvtk and mayavi can be run using nose:

pytest -v tvtk/tests
pytest -v mayavi

The integration tests:

cd integrationtests/mayavi
python run.py

Bug tracker, mailing list etc.

The bug tracker is available in github Please provide info and details on platform, python, vtk and gui backends and their versions. If possible, a small example replicating the the problem.

If you have questions you could ask on the Mayavi-users mailing list. This is used by some folks and is not too active. Another mailing list that may be of use is the ETS Users mailing list. This is a more general list where a lot of folks experienced with the Enthought Tool Suite are available.

Authors and Contributors

  • Core contributors:

    Prabhu Ramachandran: primary author.

  • Previous contributors:

    Gaël Varoquaux: mlab, icons, many general improvements and maintenance.

    Deepak Surti: Upgrade to VTK 5.10.1, VTK 6.x with new pipeline.

  • Support and code contributions from Enthought Inc.

  • Patches from many people (see the release notes), including K K Rai and R A Ambareesha for tensor support, parametric source and image data.

    Many thanks to all those who have submitted bug reports and suggestions for further enhancements.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mayavi-4.9.0.tar.gz (8.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mayavi-4.9.0-py3-none-win_amd64.whl (19.7 MB view details)

Uploaded Python 3Windows x86-64

mayavi-4.9.0-py3-none-manylinux_2_17_x86_64.whl (19.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

mayavi-4.9.0-py3-none-macosx_10_15_universal2.whl (19.6 MB view details)

Uploaded Python 3macOS 10.15+ universal2 (ARM64, x86-64)

File details

Details for the file mayavi-4.9.0.tar.gz.

File metadata

  • Download URL: mayavi-4.9.0.tar.gz
  • Upload date:
  • Size: 8.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mayavi-4.9.0.tar.gz
Algorithm Hash digest
SHA256 d12cfb362a658b0d99f088184abb6dca805d8accc437bd5e8131c221987783de
MD5 512617b63e3334ce4eb6741407354082
BLAKE2b-256 812b00cd6594cde296ed8556572b2e83f5ef62fbf9649cecc4776e8a2f1fcc31

See more details on using hashes here.

Provenance

The following attestation bundles were made for mayavi-4.9.0.tar.gz:

Publisher: wheel.yml on enthought/mayavi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mayavi-4.9.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: mayavi-4.9.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 19.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mayavi-4.9.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 457df3f2efa2453d00d2da9c70c4c7b91a72af6312304b7f3c67d747f6615fcb
MD5 c2e858da81799df8be5b666c3d9d3706
BLAKE2b-256 3e3c7966f9433131d717a1ca22c2bf44764cd8203367e14804e083199e330727

See more details on using hashes here.

Provenance

The following attestation bundles were made for mayavi-4.9.0-py3-none-win_amd64.whl:

Publisher: wheel.yml on enthought/mayavi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mayavi-4.9.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for mayavi-4.9.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 8de928cc7714d452aae4eac03e1246fb75d1ee1ec17fd51aa643fcfd521f016b
MD5 4125c11b26f9ada54325d55ae0d260fe
BLAKE2b-256 b2b91075d3cbe0d173ad77b78258fa32b73efb5b4c54d6cb4ff6027e9aba5b9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mayavi-4.9.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: wheel.yml on enthought/mayavi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mayavi-4.9.0-py3-none-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for mayavi-4.9.0-py3-none-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 964fa39f5eaba7b5b6e50cb3e144c0f47e7fb14bdc807f9d2e53e959df7a3014
MD5 6008311e9d3685da7f95c4987e272b3a
BLAKE2b-256 9aeb926cddc9a27380ca170eda5bd1987582b9d09aaa6df8c991baaf975f134f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mayavi-4.9.0-py3-none-macosx_10_15_universal2.whl:

Publisher: wheel.yml on enthought/mayavi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page