enableDefaultInteractivity - Enable built-in axes interactions - MATLAB (original) (raw)
Main Content
Enable built-in axes interactions
Syntax
Description
enableDefaultInteractivity([ax](#mw%5Fa96ea903-fe6d-4a74-8791-aaf5da68832a))
enables thebuilt-in interactions for the specified axes, if they are not already enabled. You can use this function to enable the default set of interactions or a custom set of interactions.
Examples
Create a plot. Some interactions are enabled by default, such as scrolling to zoom. Disable these default interactions.
plot(magic(10)) ax = gca; disableDefaultInteractivity(ax)
Then, reenable the interactions.
enableDefaultInteractivity(ax)
Create a plot, and replace the default set of axes interactions with just the rotate and zoom interactions. Then disable the interactions.
plot(magic(10)) ax = gca; ax.Interactions = [rotateInteraction zoomInteraction]; disableDefaultInteractivity(ax)
Reenable the interactions you created.
enableDefaultInteractivity(ax)
Input Arguments
Axes, specified as an Axes
, PolarAxes
, orGeographicAxes
object.
More About
Built-in axes interactions allow you to explore charts using gestures, for example dragging to pan or scrolling to zoom. These interactions are built into the parent axes and are available without having to select any of the buttons in the axes toolbar. Most types of axes include a default set of built-in interactions. You can customize the default set of interactions on axes with an Interactions
property.
If you do not want any of the interactions enabled, use the disableDefaultInteractivity function to disable them. To enable them if they are not already enabled, use the enableDefaultInteractivity
function.
Version History
Introduced in R2018b