Last active
December 11, 2015 04:18
-
-
Save acadien/4544237 to your computer and use it in GitHub Desktop.
Quick script to test mlab.pipeline.widgit with colormaps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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