On Sat, May 28, 2011 at 01:49:52AM +0000, Cheng, Roseanne wrote:
> How do I fix the range in values for the scalar color bar? In gnuplot,
> I am used to setting the cbrange. What code should I write in Python
> for it for Mayavi?
> d = mlab.pipeline.open("star.vtk")
> ipw_z=mlab.pipeline.image_plane_widget(d,colormap='jet',
> plane_orientation='z_axes',
> slice_index=31,
> )
Set the vmin and vmax keyword arguments of image_plane_widget.
> ipw_z.module_manager.scalar_lut_manager.show_scalar_bar = True
You can also use 'mlab.colorbar' to do this. Althought, it won't do
anything terribly different.
HTH,
Gael
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users