Opening cameratoolbar
in the editor reveals that orbiting is accomplished by setting the figure's WindowButton*
callbacks temporarily to nested/sub functions within cameratoolbar
.
Judging from the 1-minute diagonal read-through I did, the camera orbit itself is accomplished by calling a pan/zoom function orbitPangca
, which recursively calls cameratoolbar
. This recursion loop is controlled by flags which are toggled by the callbacks from the toolbar buttons. These flags alter the behaviour of each iteration in the recursion loop.
If this is indeed the case, it would imply that Matlab is not accepting commands from any source you have programmatic control over, while the plot is orbiting. It'll only respond to the button presses. This means that if you want to stop the motion programmatically, you'd have to hack cameratoolbar
to allow for this - not the most portable option.
Another idea that just popped to mind, is figuring out which WindowButton*
callback is used for the orbit, and define your own function there. You might just be lucky enough that the MathWorks implemented cameratoolbar
such that both callbacks are called each iteration, which would give you programatic control over the flags. But -- you'd have to test this yourself.