MATLAB: Select axes for zoom in/out

2dfigureMATLAB

I've got a figure with several axes. These axes are parented with a plot of several variables. Also, I've created a popup menu to select which of these axes I want to use. Until here all is OK.
However, when I select the axes and I push the zoom in button, The figure always takes the same axes.

Best Answer

Are you selecting the axes by using
axes(Handle)
If so then when you push the zoom in button you would be making active the axes where the zoom in button itself is.
When you select the axes handle through the popup, record the handle of the selected axes somewhere, and then when you go to do the plot, recall that handle and use it in the plot() call,
plot(AxesHandle, x, y...)