启用缩放模式
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 thezoom
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, seeControl Chart Interactivity。
Most charts support zoom mode, including line, bar, area, histogram, and surface charts. Charts that support zoom mode typically display the zoom inand zoom outicons 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 thexdimension only, andzoom off
disables zoom mode. For more zoom mode options, seeoption
。
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 holdShiftand 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 callingzoom
restores the most recently used zoom option ofon
,xon
, oryon
。
zoom(
zooms the current axes by the specified zoom factor without affecting the zoom mode. Zoom in by specifyingfactor
)factor
as a value greater than 1. Zoom out by specifyingfactor
as a value between 0 and 1.
zoom(
sets the zoom mode for all axes in the specified figure. Specify the additional argument asfig
,___)'on'
,'off'
,'out'
,'reset'
,'xon'
,'yon'
, or a zoom factor. For example, usezoom(fig,'on')
to enable zoom mode for the figurefig
。
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, seeCamera 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 |