rotate view using keyboard - how to change increment?

12 views (last 30 days)
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.

Accepted Answer

Walter Roberson
Walter Roberson on 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.

More Answers (0)

Categories

Find more on Desktop in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!