rotate view using keyboard - how to change increment?

1 vue (au cours des 30 derniers jours)
Herwig Peters
Herwig Peters le 3 Oct 2011
You can rotate an image created by plot3 either using your mouse or using the keyboard's left/right key. For large plotted data sets I prefer the second method, as for every command I'd need to wait a couple of seconds for a response.
The plotted data is rotated by approx. 5 degrees every time I press the left/right key. How do I change this value? I want to rotate it by 30 or 45 degrees every time I press the left/right key.

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Oct 2011
Sorry. It is a 2 degree rotation, and it is hard-coded in to the rotaKeyPressFcn function inside toolbox/matlab/graph3d/rotate3d.m
In order to change it, you would either have to edit that file (probably not a good idea) or else set() the figure KeyPressFcn after rotation had been turned on. Changing the KeyPressFcn would likely require turning off the listener on something, bashing in the new value, and then turning listeners back on, as the uimode functions usually install listeners that disable changing the KeypressFcn while the mode is active.

Plus de réponses (0)

Catégories

En savoir plus sur 3-D Scene Control dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by