Questions tagged [mayavi]

MayaVi is a data visualization library written for use with Python.

Wiki:

Mayavi is a Sanskrit word meaning "magician" and in this case is a free and easy to use scientific data visualizer. It is GUI-based and provides full functionality for python as well as PLOT3D data. It can be used to visualize many types of data including computational grids, scalar vectors, and time series.

Mayavi seeks to provide easy and interactive visualization of 3-D data. It offers:

  • 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, or an object-oriented programming interface.
  • Mayavi integrates seamlessly with numpy and scipy for 3D plotting and can even be used in IPython interactively, similarly to Matplotlib.

Tag usage:

The tag can be used in programming related problems in visualizing 3-d data. Please avoid theoretical problems and installation related problem on stackoverflow. Please note superuser.com is another stack exchange website for question and answers related to such problems.

Read more:

614 questions
85
votes
1 answer

Mayavi colorbar in TraitsUI creating blank window

I'm trying to create a GUI in TraitsUI that includes two Mayavi figures. I have implemented these figures as per the multiple engines example in the Mayavi documentation. However, when I add a colorbar to one of the figures and run the GUI script it…
Siyh
  • 1,747
  • 1
  • 17
  • 24
54
votes
1 answer

Is it possible to directly apply an affine transformation matrix to a Mayavi ImageActor object?

I'm using Mayavi to render some imaging data that consists of multiple 2D planes within a 3D volume, the position, orientation, and scale of which are defined by 4x4 rigid body affine transformation matrices. Each plane consists of: An array of 2D…
ali_m
  • 71,714
  • 23
  • 223
  • 298
37
votes
1 answer

How to plot a 3D density map in python with matplotlib

I have a large dataset of (x,y,z) protein positions and would like to plot areas of high occupancy as a heatmap. Ideally the output should look similiar to the volumetric visualisation below, but I'm not sure how to achieve this with matplotlib.…
nv_wu
  • 1,045
  • 1
  • 13
  • 24
35
votes
7 answers

installing Mayavi with pip - no module named vtk

I want to use Mayavi. Situation I use a MacBook Air, with OSX 10.7.3. I use Python 2.7.2 I have virtualenv installed. But I have not used it for this installation. I've manually installed all it's dependencies, including VTK. For VTK, I followed…
Yasser Souri
  • 1,967
  • 2
  • 19
  • 26
16
votes
4 answers

Mayavi points3d with different size and colors

Is it possible in mayavi to specify individually both the size and the colors of every point? That API is cumbersome to me. points3d(x, y, z...) points3d(x, y, z, s, ...) points3d(x, y, z, f, ...) x, y and z are numpy arrays, or lists, all of the…
linello
  • 8,451
  • 18
  • 63
  • 109
15
votes
1 answer

How to obscure a line behind a surface plot in matplotlib?

I want to plot data using Matplotlib via a colormap on the surface of a sphere. Additionally, I would like to add a 3D line plot. The code I have so far is this: import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import…
Ethunxxx
  • 1,229
  • 4
  • 16
  • 34
15
votes
4 answers

Specify absolute colour for 3D points in MayaVi

I am using the MayaVi Python library to plot 3d points, using the points3d class. The documentation specifies that the colour of each point is specified through a fourth argument, s: In addition, you can pass a fourth array s of the same shape as…
Bill Cheatham
  • 11,396
  • 17
  • 69
  • 104
15
votes
4 answers

TVTK Error in Mayavi (Python)

I'm running a Fedora 17 (x64) machine, and I tried installing Mayavi for python via yum install mayavi which worked fine, except every time I write a code where I call a mayavi module (like mlab) : from enthought.mayavi import mlab it yells with…
Kitchi
  • 1,874
  • 4
  • 28
  • 46
14
votes
1 answer

How to plot proper 3D axes in MayaVi, like those found in Matplotlib

I would like to know how to have proper axes on a 3D surface plot in MayaVi. The best axes I could create looked something like this... However, these do not look very professional if I were to give a presentation or put these on a poster. I would…
Ben Donovan
  • 199
  • 1
  • 7
14
votes
1 answer

Saving multiple images in MayaVi

I want to render around 500 images and save them to different png files, therefore I wrote a small class which contains my dataset and a renderfunction from mayavi import mlab mlab.options.offscreen=True class Dataset(object): def…
jrsm
  • 1,595
  • 2
  • 18
  • 39
13
votes
5 answers

Get mayavi working with Python 3

I'm having trouble running mayavi in python 3.3 When running my program with python3 (or python3.3) i get from mayavi import mlab as ml ImportError: No module named 'mayavi' To get numpy and matplotlib to work, i used: sudo apt-get install…
Hme
  • 243
  • 1
  • 2
  • 6
12
votes
2 answers

Phong shading for shiny Python 3D surface plots

I'm trying to create aesthetically pleasing 3D plots in Python with specular shading, and thus far have tried using both Matplotlib with 3D axes and surface plots from Mayavi, e.g., from the Mayavi surf examples web page: The results look good, and…
NewPythonUsers1
  • 141
  • 1
  • 3
12
votes
2 answers

Animating a mayavi points3d plot

I'm trying to make a video of the trajectories of particles. However, somehow my scene never updates. Here's a very simple example: from __future__ import absolute_import, division, print_function from mayavi import mlab import numpy as np import…
Nikratio
  • 2,338
  • 2
  • 29
  • 43
10
votes
2 answers

3D Contour plot from data using Mayavi / Python

I would like to do a 3D contour plot using Mayavi in exactly the same way as the third figure on this page (a hydrogen electron cloud model) : http://www.sethanil.com/python-for-reseach/5 I have a set of data points which I created using my own…
joshlk
  • 1,499
  • 3
  • 20
  • 33
10
votes
2 answers

Mayavi: rotate around y axis

I'm plotting a 3D mesh using mayavi's triangular_mesh method. The data describes a human silhouette laying face-down in 3D space (so the cmap can be used to denote distance from the camera). Here's the code used to generate the plot (the faces and…
MassivePenguin
  • 3,701
  • 4
  • 24
  • 46
1
2 3
40 41