cameratoolbar
R2026bControl camera toolbar programmatically
Syntax
Description
Display Camera Toolbar
Note
In most cases, you do not need the
cameratoolbar function to access the camera tools. To access
the camera tools, click Camera Tools
on the Tools tab in the
figure. (since R2025a)
cameratoolbar displays an interactive camera toolbar in the
current figure. To use this syntax, the ToolBar property of the figure must be set to
"figure" or "none".
Set Camera Toolbar Parameters
cameratoolbar( resets the current
camera, scene light, or target to the state before interactions began.reset)
cameratoolbar("SetCoordSys", sets
the principal axis of camera motion.coordsys)
cameratoolbar( sets
parameters for the camera toolbar in the specified figure. Specify the figure before any
of the input argument combinations in the previous syntaxes.fig,___)
returns
the tb = cameratoolbar(___)Toolbar object.
Get Camera Toolbar Parameters
returns the
visibility of the camera toolbar in the current figure (tf = cameratoolbar("GetVisible")1 if visible,
0 if not visible).
returns the
current camera motion control mode.m = cameratoolbar("GetMode")
returns the
current principal axis of camera motion.p = cameratoolbar("GetCoordSys")
___ = cameratoolbar(
gets parameters for the camera toolbar in the specified figure.fig,___)
Examples
Input Arguments
Output Arguments
Tips
Interacting with the camera toolbar disables the built-in axes interactions within the figure.
Showing the camera toolbar automatically changes the aspect ratio of the axes in the figure to avoid distortion as you move the camera around the scene. Hiding the toolbar does not revert the impacted
Axesproperties.

