On Saturday 28 May 2011 07:19 AM, Cheng, Roseanne wrote: > Hi guys, > > 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? > > This is how I get my plot > > d = mlab.pipeline.open("star.vtk") > ipw_z=mlab.pipeline.image_plane_widget(d,colormap='jet', > plane_orientation='z_axes', > slice_index=31, > )
IIRC you can pass vmin=min_val, vmax=max_val to this call and it should work. If not you can use the record mode, change the settings on the UI and see what code that corresponds to as described here: http://github.enthought.com/mayavi/mayavi/application.html#recording-mayavi-actions-to-a-script You can also turn on/off recording using mlab.start_recording() mlab.stop_recording() cheers, Prabhu ------------------------------------------------------------------------------ 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 MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users