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

Version History

Introduced in R2018a