| MATLAB® | ![]() |
| On this page… |
|---|
You can dock figures in the MATLAB desktop by clicking
the dock button,
,
which appears on the right end of the menu bar. Once docked, figures
are placed in a figure group container, which you can also dock and
undock.
You can select from a variety of arrangements of the figures in the container. The following picture shows how to select various figure arrangements. Once docked, the figure container displays the toolbar and menubar of the figure with focus.

There are two figure properties that are related to figure docking — DockControls and WindowStyle.
The DockControls property controls the display of the controls used to dock figures. Setting DockControls to off removes the dock button from the menubar and disables docking from the figure Desktop menu.
When you set the WindowStyle property to docked, MATLAB docks the figure in the desktop within a figure group container.
If WindowStyle is set to docked,
MATLAB automatically sets DockControls to on.
You cannot set the DockControls property to off.
You cannot set the figure Position property.
If you want MATLAB to always dock figures, set the default value of the WindowStyle property to docked. The following statement,
set(0,'DefaultFigureWindowStyle','docked')
creates a default value for the WindowStyle property on the root level. Issuing this statement on the command line sets the WindowStyle of all figures for the duration of your MATLAB session (unless you change the value).
Place this statement in your startup.m file to make MATLAB always dock figures. See startup for more information on startup.m.
In cases where you do not want users to be able to dock figures (e.g., figures used for GUIs), you should set figure properties as follows:
DockControls to off
WindowStyle to normal or modal
HandleVisibility to off or callback
![]() | Figure Objects | Positioning Figures | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |