MATLAB: How to enable zooming on custom GUIs that have multiple axes

customenableguisMATLABzoom

I have a custom GUI with multiple axes. How do I perform zooming operation on the axes like on any standard figure?

Best Answer

You can use either of the following solutions to enable zooming operation in the custom GUI:
1. You can create the toolbar that includes zooming functionality and control its visibility property to enable the toolbar in your custom GUI. Please refer to the following links for more information on creating the toolbar on figures in MATLAB, and to control the appearance of the toolbar, respectively:
For example, consider a figure that does not have a toolbar to perform zooming, as follows:
>> f = figure('ToolBar','none')
You can set the "toolbar" property of the figure to enable the toolbar in this figure. You can do so, by executing the following command in the Command Window:
>> set(f,'toolbar','figure');
2. You can turn on interactive zooming by using the "zoom" function. Please refer to the following link for more information on using the zoom function: