Skip to content

Instantly share code, notes, and snippets.

@acadien
Last active December 11, 2015 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acadien/4544237 to your computer and use it in GitHub Desktop.
Save acadien/4544237 to your computer and use it in GitHub Desktop.
Quick script to test mlab.pipeline.widgit with colormaps.
#!/usr/bin/python
import numpy as np
import mayavi.mlab as mlab
x, y, z = np.ogrid[-10:10:20j, -10:10:20j, -10:10:20j]
s = np.sin(x*y*z)/(x*y*z)
mlab.pipeline.image_plane_widget(mlab.pipeline.scalar_field(s),
plane_orientation='x_axes',
slice_index=10,
colormap='jet'
)
mlab.pipeline.image_plane_widget(mlab.pipeline.scalar_field(s),
plane_orientation='y_axes',
slice_index=10,
)
mlab.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment