This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Enable default axes interactions





enableDefaultInteractivity(ax) enables the default interactions for the specified axes, if they are not already enabled.


collapse all

Create a plot. Some interactions are enabled by default, such as using the scroll-wheel to zoom. Disable these default interactions.

ax = gca;

Then, reenable the default interactions.


Input Arguments

collapse all

Axes, specified as an Axes or PolarAxes object.

More About

collapse all

Default Interactions

When you create a plot, some types of interactions are enabled by default. Other types of interactions are enabled only when you select buttons on the axes toolbar that appears above the top-right corner of the axes. The interactions that are enabled by default depend on the axes. However, typical default interactions include using the scroll-wheel to zoom in and out of the axes or hovering over a data point to see a data tip.

If you do not want any interactions enabled by default, use the disableDefaultInteractivity function to disable them. To enable them if they are not already enabled, use the enableDefaultInteractivity function.

Introduced in R2018b