I am creating a 2-D plot using Mayavi, in order to take advantage of some of the rendering features. Since it is a 2-D (x,y) plot, placed in 3-D space, I would like restrain the mouse interaction with the plot such that the plot cannot be rotated with the mouse, only zoomed or panned. Is this possible?

There is a similar question here, but has not been answered as yet. The code there would apply to my case as well, even though it's 3-D.

Regards,

-Mark

有帮助吗?

解决方案

Via Gael Varoquaux: http://docs.enthought.com/mayavi/mayavi/tips.html#changing-the-interaction-with-a-scene

figure.scene.interactor.interactor_style =  tvtk.InteractorStyleImage()
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top