Restrict panning and zoom limits over multiple axes If you're using Matlab R2021a or later, you can use the LimitsChangedFcn instead of a listener which is the better approach The demo in this answer shows how to achieve this using two axes that are on top of each other but the process will be no different for axes that are not overlapping
Scream Louder, I Can’t Hear You! - Loren on the Art of MATLAB When MATLAB versions R2014b and newer are automatically calculating the limits, the limits frequently change several times as MATLAB inspects each member of the axes and updates the limits