Edit -> Undo in figure does not fire ActionPostCallback for zoom - bug or feature?
Show older comments
Hi,
Using the 'Undo Zoom' command in a figure (via Edit -> Menu or CTRL+Z) does not call the function set by ActionPostCallback. Is this a bug or a feature? Consider the following code:
hFig = figure;
plot(rand(10));
zoom(hFig, 'on');
hZoom = zoom(hFig);
set(hZoom, 'ActionPostCallback', @(x, y)disp(datestr(now)));
The callback is fired when zooming using the mouse (as can be seen in the Command Window). However, when pressing CTRL+Z, the limits of the axes are changed, but the callback isn't fired. Any quick ideas for a workaround?
Thanks!
Answers (1)
Gustaf Lönn
on 26 Jul 2013
0 votes
Categories
Find more on Interactive Control and Callbacks 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!