I would like to get a callback function to execute while I am dragging a plot with the pan tool. Matlab provides documented callbacks using the pan(axis) handle. However these can only execute before and after the pan operation, and not during. This means that other objects which I've drawn over the canvas cannot scroll with the plot.
set(pan(hfig),'ActionPreCallback', @(h, ev) preZoomFcn(h, ev));
set(pan(hfig),'ActionPostCallback', @(h, ev) postZoomFcn(h, ev));
Are there any ways I can get my callback to execute as the plot is being dragged?