axtoolbar
Get or configure the axes toolbar.
📝Syntax
tb = axtoolbar()
tb = axtoolbar(buttons)
tb = axtoolbar(ax)
tb = axtoolbar(ax, buttons)
tb = axtoolbar(..., name, value, ...)
[tb, btns] = axtoolbar(...)
📥Input Arguments
Parameter Description
ax a scalar graphics object value: an axes. Default: current axes.
buttons a character vector, a string array or a cell array of character vectors: 'default', 'export', 'brush', 'datacursor', 'rotate', 'pan', 'zoom', 'restoreview', 'zoomin' or 'zoomout'. The names are validated only: the figure toolbar of Nelson is shared by all axes.
name, value properties of the axes toolbar, for example 'Visible', 'Tag', 'UserData'.
📤Output Arguments
Parameter Description
tb a scalar graphics object value: the axes toolbar.
btns an empty graphics object array: Nelson has no per-axes buttons.
📄Description

axtoolbar returns the Toolbar object of an axes and applies the given properties to it.

Use axtoolbar('Visible', 'off') to hide the toolbar of the current axes.

When the Toolbar property of the target was set to empty, call reset on the target to restore it before axtoolbar.

💡Examples
f = figure();
surf(peaks(40), 'EdgeColor', 'none');
tb = axtoolbar('Visible', 'off')
🔗See Also
axes properties
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub