Enable zoom mode
Zoom mode allows you to explore data by changing the limits of axes. In releases
prior to R2018b, use zoom mode to zoom in or out of axes. Turn zoom mode on and off, and set
other basic options, using the zoom
function. To further control zoom
mode behavior, return and use a zoom object.
Starting in R2018b, you can zoom in and out using built-in interactions instead. Built-in interactions do not require you to enable a mode and respond faster than interaction modes. For more information about built-in interactions, see Control Chart Interactivity.
Most charts support zoom mode, including line, bar, area, histogram, and surface charts.
Charts that support zoom mode typically display the zoom in and zoom out
icons in the axes toolbar.
zoom
enables or disables zoom mode
for all axes in the current figure. For example, option
zoom on
enables zoom
mode, zoom xon
enables zoom mode for the x
dimension only, and zoom off
disables zoom mode. For more zoom mode
options, see option
.
When zoom mode is on, to zoom in, position your cursor where you want the center of the axes to be and either scroll up or click. To zoom out, either scroll down or hold Shift and click. Each click zooms in or out by a factor of 2. To zoom into a rectangular region, click and drag. To return an axes object to its baseline zoom level, double-click within the axes.
zoom
toggles the zoom mode. If zoom mode is disabled, then
calling zoom
restores the most recently used zoom option of
on
, xon
, or yon
.
zoom(
zooms the current axes by the
specified zoom factor without affecting the zoom mode. Zoom in by specifying
factor
)factor
as a value greater than 1. Zoom out by specifying
factor
as a value between 0 and 1.
zoom(
sets the zoom
mode for all axes in the specified figure. Specify the additional argument as
fig
,___)'on'
, 'off'
, 'out'
,
'reset'
, 'xon'
, 'yon'
, or a
zoom factor. For example, use zoom(fig,'on')
to enable zoom mode for
the figure fig
.
Use zoom object functions to customize the behavior of axes objects within a figure. For all of the zoom object functions, the axes and zoom objects must be associated with the same figure.
|
Enabling zoom for axes using
|
|
Returning the zoom mode of axes using
|
|
Setting the zoom dimension for axes using
|
|
Returning the zoom dimension of
axes using |
|
For more information about the camera view angle, see Camera Graphics Terminology. |
|
|
| This function is not recommended. Use
The axes
zoom dimension that is set by |
| This function is not recommended. Use
The axes
zoom dimension that is returned using |