hZoom = zoom; setAllowAxesZoom(hZoom,handles.axes,true); set(hZoom,'Motion','both','Enable','on'); |
Matlab provides the function of making axes zoomable in a gui (zoom reference).
In a matlab gui this is enable by using this code: