Is it possible to prohibit axes rotation with the mouse in Mayavi?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to prohibit axes rotation with the mouse in Mayavi?

Mark Bray
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, the view starts off as looking down the z-axis. However, 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 on StackOverflow
(http://stackoverflow.com/questions/14225512/constrain-mayavi-mouse-drag-to-rotating-earth-around-its-axis),
but has not been answered as yet. I believe the code there would apply
to my case as well, even though it's 3-D.

Regards,
     -Mark

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to prohibit axes rotation with the mouse in Mayavi?

Gael Varoquaux
figure.scene.interactor.interactor_style = \
                                 tvtk.InteractorStyleImage()

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

HTH,

Gaƫl

On Thu, Feb 28, 2013 at 07:29:32AM -0500, Mark Bray wrote:
> 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, the view starts off as looking down the z-axis. However, 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 on StackOverflow
> (http://stackoverflow.com/questions/14225512/constrain-mayavi-mouse-drag-to-rotating-earth-around-its-axis),
> but has not been answered as yet. I believe the code there would apply
> to my case as well, even though it's 3-D.

> Regards,
>      -Mark

> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

--
    Gael Varoquaux
    Researcher, INRIA Parietal
    Laboratoire de Neuro-Imagerie Assistee par Ordinateur
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    Phone:  ++ 33-1-69-08-79-68
    http://gael-varoquaux.info            http://twitter.com/GaelVaroquaux
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev