Main Content

addToolbarExplorationButtons

Add data exploration buttons to figure toolbar

Description

addToolbarExplorationButtons(fig) adds the data exploration buttons to the figure toolbar for the specified figure.

In R2018b, the data exploration buttons were moved from the figure toolbar to the axes toolbar. In most cases, you do not need to use this function. However, if you have code that relies on the buttons appearing in the figure toolbar, you can use the addToolbarExplorationButtons and removeToolbarExplorationButtons functions to control the appearance of the buttons in the figure toolbar.

example

Examples

collapse all

Create a figure with a surface plot. Then add the data exploration buttons to the figure toolbar.

fig = figure;
surf(peaks);
addToolbarExplorationButtons(fig)

Notice that the figure toolbar now includes buttons to zoom in, zoom out, and so on.

Remove the buttons from the figure toolbar.

removeToolbarExplorationButtons(fig)

Input Arguments

collapse all

Target figure, specified as a single Figure object or a vector of Figure objects.

More About

collapse all

Data Exploration Buttons

The standard data exploration buttons include options to:

  • Zoom in or out of the axes view

  • Pan the axes view

  • Rotate the axes view

  • Show data tips

  • Brush data

In R2018b, the data exploration buttons were moved from the figure toolbar to the axes toolbar. This figure illustrates the relocation of the buttons.

Figure with an arrow pointing from buttons in the figure toolbar to buttons above the upper-right corner of the axes

Version History

Introduced in R2018a