• Stars
    star
    1,251
  • Rank 36,157 (Top 0.8 %)
  • Language
    Python
  • License
    Other
  • Created over 13 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

3D visualization of scientific data in Python

Mayavi: 3D visualization of scientific data in Python

Mayavi docs: http://docs.enthought.com/mayavi/mayavi/ TVTK docs: http://docs.enthought.com/mayavi/tvtk

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
  2. A GUI toolkit, either PyQt4, PySide, PySide2, PyQt5 or wxPython.

The latest VTK wheels are available on all the major platforms (Windows, MacOS, and Linux), but only for 64 bit machines. Python 3.x is fully supported on all these operating systems and Python 2.7.x on 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

On Python 3.x you will need to install PyQt5 and wheels are available for this. On 2.7.x you have more options, and can use PySide, PyQt4, and wxPython. These can be installed from pip or from your package manager.

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. PyQt/PySide/PySide2 should work largely 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 PyQt5

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 -r requirements.txt
$ pip install PyQt5  # replace this with any supported toolkit
$ python setup.py install  # or develop

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:

nosetests -v tvtk/tests
nosetests -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.

More Repositories

1

pyql

Cython QuantLib wrappers
Cython
922
star
2

traits

Observable typed attributes for Python classes
Python
415
star
3

traitsui

TraitsUI: Traits-capable windowing framework
Python
294
star
4

chaco

Chaco is a Python package for building interactive and custom 2-D plots.
Python
290
star
5

comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Python
275
star
6

pyface

pyface: traits-capable windowing framework
Python
103
star
7

Numpy-Tutorial-SciPyConf-2019

Numpy-Tutorial-SciPyConf-2019
Python
97
star
8

enable

Enable: low-level drawing and interaction
C
92
star
9

envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
Python
80
star
10

scimath

Python
65
star
11

Numpy-Tutorial-SciPyConf-2018

SciPy 2018 NumPy tutorial
Python
56
star
12

codetools

Tools for Python code analysis and execution.
Python
50
star
13

jigna

HTML frontend for Traits models.
Python
39
star
14

apptools

Python
38
star
15

ets

ets.py is a utility to clone and manage various Enthought Tool Suite packages
Python
34
star
16

Numpy-Tutorial-SciPyConf-2020

Numpy-Tutorial-SciPyConf-2020
Jupyter Notebook
29
star
17

terraform-modules

Reusable terraform modules
HCL
26
star
18

graphcanvas

Python
25
star
19

qt_binder

Thinly wrap Qt widgets with Traits
Python
19
star
20

Numpy-Tutorial-SciPyConf-2021

Public GitHub repo for SciPy 2021 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
17
star
21

blockcanvas

Python
16
star
22

pywin32-ctypes

A (partial) reimplementation of pywin32 in pure python
Python
15
star
23

traits-enaml

A library to facilitate interoperation of Traits with Enaml > 0.8.x
Python
15
star
24

Numpy-Tutorial-SciPyConf-2022

Public GitHub repo for SciPy 2022 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
14
star
25

encore

A Collection of core-level utility modules for Enthought projects
Python
14
star
26

ibm2ieee

NumPy ufuncs for converting IBM-format hexadecimal floating-point to IEEE 754-format binary floating-point.
Python
9
star
27

traits-futures

Reactive background processing for TraitsUI applications
Python
8
star
28

ets-examples

Examples showing how the Enthought Tool Suite packages can work together.
Python
5
star
29

distarray

Default Repo description from terraform module
Python
5
star
30

blusky

BluSky
Jupyter Notebook
5
star
31

Numpy-Tutorial-SciPyConf-2023

Public GitHub repo for SciPy 2023 tutorial (Introduction to Numerical Computing With NumPy)
Jupyter Notebook
5
star
32

vpsearch

Fast similarity search for genomic sequences via vantage-point trees
Cython
4
star
33

ncurses-5.5

C
4
star
34

ensemble

High-level widgets for building Python applications
Python
4
star
35

etsproxy

Python
4
star
36

enaml

Default Repo description from terraform module
Python
3
star
37

sat-solver

Default Repo description from terraform module
Python
3
star
38

rested

Default Repo description from terraform module
Python
2
star
39

okonomiyaki

Okonomiyaki is aimed at consolidating a lot of our low-level code used for Enthought's eggs and python runtimes.
Python
2
star
40

traits4

Default Repo description from terraform module
Python
2
star
41

db

Default Repo description from terraform module
C
2
star
42

bzip2-1.0.6

Default Repo description from terraform module
C
2
star
43

Python-2.7.3

Default Repo description from terraform module
Python
2
star
44

tcl

Default Repo description from terraform module
C
1
star
45

appinst

Default Repo description from terraform module
C
1
star
46

scipy-refactor

Default Repo description from terraform module
C++
1
star
47

qt-mobility

Default Repo description from terraform module
C++
1
star
48

nfftpy

Default Repo description from terraform module
Python
1
star
49

setup-edm-action

Setup EDM for GitHub Actions CI
JavaScript
1
star
50

db-4.7.25

Default Repo description from terraform module
C
1
star
51

machotools

Default Repo description from terraform module
Python
1
star
52

graph

Default Repo description from terraform module
C
1
star
53

gom-jabbar

gom-jabbar 🏜🐛 - Unit testing for NGSPICE code models
Python
1
star
54

glfwpy

Default Repo description from terraform module
Python
1
star
55

Numpy-Tutorial-SciPyConf-2015

Default Repo description from terraform module
Python
1
star
56

ctraits

Default Repo description from terraform module
Python
1
star
57

etsdevtools

Default Repo description from terraform module
Python
1
star
58

pikos

Default Repo description from terraform module
Python
1
star