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

Alternative to Mayavi for scientific 3d plotting

I need to plot a scalar field that is structured in a 3D grid as the one that follows: import numpy as np from mayavi import mlab dt = 10 X,Y,Z = np.mgrid[0:dt,0:dt,0:dt] F = X**2+Y**2+Z**2 test = mlab.figure(size = (1024,768), bgcolor = (1,1,1),…
pysolver
  • 525
  • 6
  • 17
10
votes
1 answer

Plotting 3D graphics in Python 3

I want to do some 3D plotting to visualize some data. I'm using matplotlib but the 3D features of matplotlib are not as powerful as 2D plotting. I found Mayavi very powerful. Even matplotlib recommends it in…
iuradz
  • 1,128
  • 1
  • 12
  • 25
10
votes
3 answers

locking camera in mayavi

I'm trying to make an animation with a sequence of datafiles in mayavi. Unfortunately i have noticed that camera doesn't lock (it is zooming and zooming out). I think it is happening because the Z componrnt of my mesh is changing and mayavi is…
anatoly
  • 327
  • 2
  • 13
9
votes
5 answers

How to label axes in Mayavi using LaTeX math symbols?

I'm importing mayavi in a python script to display some 3D data set, it turns out the following naive axes labeling doesn't work from mayavi import mlab axes =mlab.axes(xlabel='$\alpha$', ylabel='$\beta$', zlabel='$\sigma$') Any ideas? I cannot…
nye17
  • 12,857
  • 11
  • 58
  • 68
9
votes
1 answer

Map an image onto a sphere and plot 3D trajectories

What I would like to do is to define a sphere in the center of my 3D coordinate system (with radius=1), wrap a cylindrical planet map onto the sphere's surface (i.e. perform texture mapping on the sphere) and plot 3D trajectories around the object…
Romero Azzalini
  • 184
  • 1
  • 1
  • 12
9
votes
2 answers

How to install Mayavi Trait backends?

OS: Linux Kubuntu 14.4.5 Python: Python 3.5.2 :: Continuum Analytics, Inc. I tried to install Mayavi into my anaconda environment: conda install -c menpo mayavi=4.5.0 conda install -c anaconda wxpython=3.0.0.0 conda install pyqt conda install…
Make42
  • 12,236
  • 24
  • 79
  • 155
9
votes
4 answers

Disable or Catch VTK warnings in vtkOutputWindow when embedding Mayavi

I'd like to either disable the VTK warning window or, better yet, catch them to handle with my application's logging system. My application is using an embedded mayavi view, and I don't want error windows popping up that I have no control over. …
flutefreak7
  • 2,321
  • 5
  • 29
  • 39
9
votes
1 answer

Using Mayavi to make 3D graphs, with Matplotlib-style axes

I've been messing around with Mayavi for 3D graphing, and I can graph the scatter plot I want but can't seem to get the Axes to look proper. I found the following previous question that starts to get at what I'm after, but doesn't go into detail. I…
dolsen
  • 91
  • 3
9
votes
2 answers

Displaying true-colour 2D RGB textures in a 3D plot?

I'm trying to make a 3D plot that consists of a series of 2D planes through an RGB stack, like this: I know that it's possible to do this using mpl_toolkits.mplot3d by passing the x, y, z coordinates and the RGB(A) colours of each pixel to…
ali_m
  • 71,714
  • 23
  • 223
  • 298
9
votes
2 answers

How do I scale the x and y axes in mayavi2?

I want to do a 3-d plot with mayavi2 using mayavi.mlab.surf(). This function has an argument called warp_scale that can be used to scale the z axis, I'm looking for something similar but for the x and y axes. I can do this manually by multiplying…
andres
  • 1,079
  • 1
  • 10
  • 17
9
votes
3 answers

Mayavi doesn't run from within Spyder: complains about "ValueError: API 'QString' ..."

I am unable to run/use Mayavi library from within Spyder IDE. I have described the problem below. Any help will be very useful. (Thank you very much in advance.) Steps to reproduce the problem: Just importing the Mayavi library in a script (for…
8
votes
1 answer

How to display a volume with non-cubic voxels correctly in mayavi

I'm using mayavi (3.3.2) to display volume isosurfaces. Generally, my volumes do not have cubic voxels; for example, the sampling grid might be 1mm x 1mm in X and Y, but 1.4mm in the Z direction. How can I get such volumes to display with the…
timday
  • 24,582
  • 12
  • 83
  • 135
8
votes
1 answer

Mayavi how to show the axes grid

In Mayavi I would like to see the grid of the axes in the following plot # Source: <>. import numpy as np from mayavi import mlab # Test data: Matlab `peaks()` x, y = np.mgrid[-3:3:50j, -3:3:50j] z =…
Adriaan
  • 715
  • 10
  • 22
8
votes
1 answer

10,000+ Point 3D Scatter Plots in Python (with Quick Rendering)

Performance-wise, the following code snippet works perfectly fine for me when plotting in mayavi. import numpy as np from mayavi import mlab n = 5000 x = np.random.rand(n) y = np.random.rand(n) z = np.random.rand(n) s = np.sin(x)**2 +…
lanery
  • 5,222
  • 3
  • 29
  • 43
8
votes
1 answer

How to use griddata from scipy.interpolate

I have a three-column (x-pixel, y-pixel, z-value) data with one million lines. The data is from an image and there are duplicated z-values. Now I need to make a surface plot. This image is a perfect example. But now the output image is null. Could…
questionhang
  • 735
  • 2
  • 12
  • 31
1
2
3
40 41