MATLAB: How to zoom in on a axis in a stand-alone application

aloneMATLAB Compilerstandstandalone

In a MATLAB figure window, there are menu options and push buttons to zoom in on an axis. I would like to know if there is an example on how to do this in a standalone application.

Best Answer

You can use a menu to create zooming options in your standalone application.
The following example uses a dropdown menu:
function zoomtest
figure('menubar', 'none')
surf(peaks)
f = uimenu('Label','Tools');
uimenu(f,'Label','Zoom In','Callback','zoom(2)', 'Accelerator', 'z');
uimenu(f,'Label','Zoom Out','Callback','zoom(1/2)', 'Accelerator', 'o');