zoomInteraction
Description
A zoom interaction allows you to zoom into a chart without having to select any
buttons in the axes toolbar. To enable zooming, set the Interactions
property of the axes to a zoomInteraction
object. When this interaction is
enabled, you can zoom by scrolling or pinching within the chart.
To enable multiple interactions, set the Interactions
property to an
array of objects.
Creation
Description
z = zoomInteraction
creates a zoom interaction object.
z = zoomInteraction('Dimensions',d)
sets the Dimensions
property.
Use this property to constrain zooming to specific dimensions. For example, z =
zoomInteraction('Dimensions','x')
constrains zooming to the
x-dimension.
Properties
Examples
Tips
In most cases, the axes have a default set of interactions which depend on the type of chart you are displaying. You can replace the default set with a new set of interactions, but you cannot access or modify any of the interactions in the default set.
Version History
Introduced in R2019a