How To Set Zoom Factor In Mayavi
I am trying to set the zoom factor in Mayavi2, for example: from mayavi import mlab mlab.test_plot3d() mlab.show() f = mlab.gcf() cam = f.scene.camera cam.zoom(0.1) mlab.draw() b
Solution 1:
It seems that you have just inverted 2 lines. mlab.show() and mlab.draw() !
Try this:
from mayavi import mlab
currfig = mlab.test_plot3d()
mlab.draw()
cam = currfig.scene.camera
for ii inrange(100):
cam.zoom(0.99)
mlab.draw()
mlab.show()
Post a Comment for "How To Set Zoom Factor In Mayavi"