MATLAB: Zoom tools from Toolbar does not work properly on every axes, Matlab GUI.

guidematlab guizoom tool

Hi guys,
I edit a GUI with some Toolbar Tools like zoom in, zoom out, ect.. I work with three different axes which are totally overlapped, so I control their visibility using the set(handles.'axes_tag','Visible','on/off') command.
I have some problems to use tools because they don't works on each axes: in fact, I have two axes with off visibility and one visible but the tools consider the first two and not the last one. I also tried to set zoom on/off for the target axes using zoom(handle.axes_tag,'on/off') command but it seems to haven't any effect.
Can someone explain me what am I wrong or the cause of this behaviour?
Thanks for attention,
Fabio

Best Answer

Sending in the axes control to each tool, like cla or zoom, should work. If it doesn't then try to set the default axes before with the axes command:
axes(handles.subplot1); % Set current axes to the desired one.
zoom(3); % Use zoom with no handles.
See if that works.
Or you can use a scroll panel. See attached demo.