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
6
votes
1 answer

mayavi - setting the [x,y,z] extent of an image programatically

I have some data that consists of several 2D images that I would like to render in specific [x,y,z] positions relative to one another using mayavi2 (v4.3.0). From the documentation it seems that I should just be able to do this with mlab.imshow().…
ali_m
  • 71,714
  • 23
  • 223
  • 298
6
votes
1 answer

Does Mayavi "Font Size" text property work?

Is there a bug in the Mayavi font rendering that prevents changing the font size? I am using the Mayavi2 GUI to change the font size of the axis labels on a volumetric plot. To get there I go to: Scene -> Scalar Field -> Colors and Legends -> Axes…
paradiso
  • 379
  • 3
  • 14
6
votes
1 answer

annotating many points with text in mayavi using mlab

I'm trying to annotate points plotted with the points3d() function using mayavi.mlab. Each point is associated with a label which I would like to plot next to the points using the text3d() function. Plotting the points is fast, however the…
user588241
  • 239
  • 3
  • 10
5
votes
2 answers

installing mayavi errors out with exit status -11

On Fedora 31, I tried to install mayavi with pip pip install mayavi However, the following error occurs Building wheel for mayavi (setup.py) ... error ERROR: Command errored out with exit status -11: command: /usr/bin/python3 -u -c 'import…
usernumber
  • 1,958
  • 1
  • 21
  • 58
5
votes
1 answer

Install Mayavi for Python 3.7.1 in Windows 10

Under Windows 10, I'm trying to run a Python script which contains the line from mayavi import mlab Therefore I'm trying to install Mayavi by running pip install mayavi from the Windows PowerShell. I then get Collecting mayavi Using cached…
Adriaan
  • 715
  • 10
  • 22
5
votes
0 answers

Importing mlab from mayavi or vtk : the kernel died

I have tried installing mayavi for several days, without results. I'm using spyder and anaconda. I can import mayavi on spyder without problem, but when I try importing vtk or from mayavi import mlab, the kernel died. I read a lot on the subject…
Amanda H
  • 51
  • 1
5
votes
2 answers

Update mayavi plot in loop

What I want to do is to update a mayavi plot in a loop. I want the updating of the plot to be done at a time specified by me (unlike, e.g., the animation decorator). So an example piece of code I would like to get running is: import time import…
Bill Cheatham
  • 11,396
  • 17
  • 69
  • 104
5
votes
0 answers

Mayavi2 mlab visualisation using multiprocessing

I'm using Mayavi2 mlab module for some scientific visualisation. There are about 100k files, I want to visualise and save as images, to assemble them in gif animation later. To speed up such visualisation, I am going to use multiprocessing…
5
votes
1 answer

How to fix "TraitError: The 'input' trait of a ... instance is 'read only'."

I have always preferred the more pythonic tvtk over vtk's raw Python API, but with the latest versions I get from MacPorts, I have the problem that basic things don't work anymore. The following snippet is taken from the tvtv documentation: from…
hans_meine
  • 1,881
  • 1
  • 17
  • 29
5
votes
2 answers

How to set parallel perspective on a 3d plot

I have a code in python to render a few spheres in python that looks like this: %matplotlib inline import numpy as np import matplotlib.pyplot as plt import random import mayavi from mayavi import mlab N = 4; diams = .4*np.ones([N]); xvals =…
anon01
  • 10,618
  • 8
  • 35
  • 58
5
votes
3 answers

python : plotting a wireframe 3D cuboid

I want to plot 3d cuboid in python. Input : center (3 points for the center) radius (3 radius values, one for each dimension) Ideally it should be a wireframe plot(I need to see whats inside).I am not exactly sure how to go about this. Using python…
mathopt
  • 569
  • 1
  • 6
  • 17
5
votes
1 answer

mayavi 3d object in matplotlib Axes3D

I sometimes find myself frustrated with the lack of certain rendering features in matplotlib's mplot3d. In most of these cases, I do find that I can get what I want in mayavi, but still the matplotlib 3d axes are preferable, if only for aesthetics,…
tsj
  • 758
  • 3
  • 23
5
votes
1 answer

Scalar fields visualisation in Python

I need to visualize several overlapping scalar fields in Python. I found mayavi library to do this kind of plots. The problem is that I don't understand how to customize a color map for scalar fields. My idea is to have shades of one color for each…
desa
  • 1,240
  • 12
  • 31
5
votes
2 answers

ImportError: No module named traits.api

I have installed mayavi to spyder in windows 7 and when I am trying to import mlab I get a strange warning: ImportError: No module named traits.api Does anybody have experienced the same problem? Any suggestions? Thanks a lot in advance.
GioR
  • 596
  • 2
  • 8
  • 19
5
votes
2 answers

Saving a mayavi animation

I am currently trying to save a mayavi animation generated by my simulation, so I don't have to rerun the code each time to see it. plt = points3d(x_coord, y_coord, z_coord) msplt = plt.mlab_source @mlab.animate(delay=100) def anim(): f =…
user3873809