Control behavior of modes in UI figures
enableLegacyExplorationModes( changes the
behavior of interaction modes in UI figures created using the
function or in MATLAB®
Online™. The behavior changes to match the behavior of modes in traditional figures
created using the
Interaction modes such as pan, zoom, rotate, and brush behave differently for traditional figures and UI figures. For example, enabling zoom in a UI figure only affects the specified axes, while enabling zoom in a traditional figure affects all of the axes in the figure. Additionally, context menus are not supported for modes in UI figures, but are supported for modes in traditional figures.
In most cases, you do not need to use this function. By default, most types of charts
include a set of built-in interactions that are faster than interaction modes and do not
require you to enable a mode. However, if you have code that relies on the behavior of modes
in traditional figures, you can use
change the behavior of modes in UI figures. For more information about built-in
interactions, see Control Chart Interactivity.
Control Behavior of Modes
Create a figure using the
uifigure function. Display two charts
in a tiled chart layout.
uif = uifigure; t = tiledlayout(uif,2,1); ax1 = nexttile(t); x = rand(20,1); y = rand(20,1); scatter(ax1,x,y) ax2 = nexttile(t); u = [75 91 105 123.5 131 150 179 203 226 249 281.5]; bar(ax2,u)
Enable brushing for one set of axes by selecting from the axes toolbar. Note that brushing is enabled for only the specified axes.
enableLegacyExplorationModes and then select . Note that brushing is enabled for all axes in the
enableLegacyInteractionModes function may cause interactions to
respond more slowly.
enableLegacyExplorationModes function sets the
UseLegacyExplorationModes property of
brush mode objects to