MATLAB: Is it possible to access figure callbacks for Pan/Zoom events
callbackfigureMATLABpanzoom
Callback routines should be added to figures that would allow users to track zoom/pan events.
Best Answer
The ability to access callbacks to pan/zoom events was added in MATLAB 7.3 (R2006b). This was made available with the "ActionPreCallback" and "ActionPostCallback" properties of the pan, zoom and rotate3d objects. More information is available in the documentation of PAN, ZOOM and ROTATE3D.
The 'WindowButtonMotionFcn' is blocked when 'rotate3d' is toggled to 'on'. As a result, automatically switching 'rotate3d' to 'off' cannot be implemented by the 'WindowButtonMotionFcn'.
There are no known workarounds besides implementing buttons to manually toggle 'rotate3d' to 'on' or 'off'.
Best Answer