mayavi

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

荒凉一梦 提交于 2021-02-18 05:44:55
问题 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 want a 3D scatter plot like #1 but with nice-looking axes like #2 (I'd embed but I don't have enough reputation). The regular Mayavi Axes aren't going to cut it. Any tips for getting the planes that Matplotlib has? 回答1: This is actually pretty

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

ε祈祈猫儿з 提交于 2021-02-18 05:43:16
问题 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 want a 3D scatter plot like #1 but with nice-looking axes like #2 (I'd embed but I don't have enough reputation). The regular Mayavi Axes aren't going to cut it. Any tips for getting the planes that Matplotlib has? 回答1: This is actually pretty

mayavi volume animation not updating

自古美人都是妖i 提交于 2021-02-11 13:21:53
问题 I’m trying to animate a Mayavi pipeline volume: src = mlab.pipeline.volume(mlab.pipeline.scalar_field(data),vmin=.1*np.max(data),vmax=.2*np.max(data)) that is combined in the pipeline by another dataset represented as a cut plane. However, I can’t get the volume visualization to update - only the first frame shows up. The animation is stepping through the data correctly (I get different values of the np.max(data[t]) below) but nothing in the visualization changes. My understanding is that

mayavi volume animation not updating

房东的猫 提交于 2021-02-11 13:21:37
问题 I’m trying to animate a Mayavi pipeline volume: src = mlab.pipeline.volume(mlab.pipeline.scalar_field(data),vmin=.1*np.max(data),vmax=.2*np.max(data)) that is combined in the pipeline by another dataset represented as a cut plane. However, I can’t get the volume visualization to update - only the first frame shows up. The animation is stepping through the data correctly (I get different values of the np.max(data[t]) below) but nothing in the visualization changes. My understanding is that

Mayavi how to show the axes grid

故事扮演 提交于 2021-02-07 07:12:05
问题 In Mayavi I would like to see the grid of the axes in the following plot # Source: <<https://scicomp.stackexchange.com/a/23148/10048>>. import numpy as np from mayavi import mlab # Test data: Matlab `peaks()` x, y = np.mgrid[-3:3:50j, -3:3:50j] z = 3*(1 - x)**2 * np.exp(-x**2 - (y + 1)**2) \ - 10*(x/5 - x**3 - y**5)*np.exp(-x**2 - y**2) \ - 1./3*np.exp(-(x + 1)**2 - y**2) mlab.figure(bgcolor=(1, 1, 1)) # Make background white. surf = mlab.surf(x, y, z, colormap='RdYlBu', warp_scale=0.3,

Mayavi how to show the axes grid

假如想象 提交于 2021-02-07 07:06:32
问题 In Mayavi I would like to see the grid of the axes in the following plot # Source: <<https://scicomp.stackexchange.com/a/23148/10048>>. import numpy as np from mayavi import mlab # Test data: Matlab `peaks()` x, y = np.mgrid[-3:3:50j, -3:3:50j] z = 3*(1 - x)**2 * np.exp(-x**2 - (y + 1)**2) \ - 10*(x/5 - x**3 - y**5)*np.exp(-x**2 - y**2) \ - 1./3*np.exp(-(x + 1)**2 - y**2) mlab.figure(bgcolor=(1, 1, 1)) # Make background white. surf = mlab.surf(x, y, z, colormap='RdYlBu', warp_scale=0.3,

Mayavi how to show the axes grid

谁说我不能喝 提交于 2021-02-07 07:05:15
问题 In Mayavi I would like to see the grid of the axes in the following plot # Source: <<https://scicomp.stackexchange.com/a/23148/10048>>. import numpy as np from mayavi import mlab # Test data: Matlab `peaks()` x, y = np.mgrid[-3:3:50j, -3:3:50j] z = 3*(1 - x)**2 * np.exp(-x**2 - (y + 1)**2) \ - 10*(x/5 - x**3 - y**5)*np.exp(-x**2 - y**2) \ - 1./3*np.exp(-(x + 1)**2 - y**2) mlab.figure(bgcolor=(1, 1, 1)) # Make background white. surf = mlab.surf(x, y, z, colormap='RdYlBu', warp_scale=0.3,

Is there a way to fill one side of the gyroid surface by using Mayavi?

心不动则不痛 提交于 2021-02-05 09:22:31
问题 I'm using Mayavi to plot an iso-surface of a gyroid. My problem is that I need a more solid structure by filling one side of the two generated areas. In the following pictures, you can see how my generated iso-surface looks like and how it should look like after filling one side. My generated iso-surface: How it should look like: The iso-surface can be generated by the following equation: U = sin(2*pi * x/a) * cos(2*pi * y/a) + sin(2*pi * y/a) * cos(2*pi * z/a) \ + sin(2*pi * z/a) * cos(2*pi

Is there a way to fill one side of the gyroid surface by using Mayavi?

我的梦境 提交于 2021-02-05 09:22:26
问题 I'm using Mayavi to plot an iso-surface of a gyroid. My problem is that I need a more solid structure by filling one side of the two generated areas. In the following pictures, you can see how my generated iso-surface looks like and how it should look like after filling one side. My generated iso-surface: How it should look like: The iso-surface can be generated by the following equation: U = sin(2*pi * x/a) * cos(2*pi * y/a) + sin(2*pi * y/a) * cos(2*pi * z/a) \ + sin(2*pi * z/a) * cos(2*pi

Single line with multiple radii with Mayavi

a 夏天 提交于 2021-01-29 02:33:05
问题 I am trying to plot a single line (or tube) in Mayavi that has a non-constant width or radius. This seems like a simple task though I may not be understanding what is happening behind the scenes well enough to make this happen. The following code creates the line I want, and I am able to scale by color; however, I would also like to scale by width. import mayavi.mlab as mlab import numpy as np x = range(100) y = range(100) z = range(100) s = np.random.uniform(0, 1, 100) mlab.plot3d(x, y, z, s