MATLAB: Am I unable to use the ZOOM function to specify a region of interest in MATLAB 7.0 (R14)

areainterestMATLABofrectanglezoom

I would like to zoom into a particular area of an axes. However the ZOOM function does not have this functionality. How can I specify a region of the axes to zoom in to?

Best Answer

The ZOOM function is primarily used to control the interactive zoom mode, although it is possible to specify a zoom factor, as in the following example:
zoom(N)
The above code will zoom in by the factor N, and not turn the zoom mode on.
To specify a particular region of an axes to zoom into, use the AXIS command
axis([xmin xmax ymin ymax])
or set the axes' XLim and YLim properties:
set(gca,'XLim',[xmin xmax],'YLim',[ymin ymax])