| Introduction Figures can contain axes and user interface objects directly, or you can parent these objects to uipanels, which you then parent to a figure. Uipanels are useful for the design of GUIs because they enable you to define subregions in a figure in which you can lay out components. The MATLAB® software interprets the Position property of all objects parented to a uipanel relative to the uipanel's position. If you move the uipanel, the children automatically move with it. Uipanels can also contain other uipanels, as well as axes, uicontrols, and uibuttongroups. See the uipanel reference page for more information on uipanels. You can create multiple axes in a uipanel and direct plotting into any of them. However, some plotting functions do not allow you to specify the parent of the graphics objects they create, so they create a new axes (and possibly a figure). To include such a graph in a uipanel, you can reparent the axes to the panel once the plot is made. |