| Creating Graphical User Interfaces | ![]() |
Figures are the windows that contain the GUI you design with the Layout Editor. See the description of figure properties for information on what figure characteristics you can control.
Displaying Plots in a Separate Figure
To prevent a figure from becoming the target of plotting commands issued at the command line or by other GUIs, you can set the HandleVisibility and IntegerHandle properties to off. However, this means the figure is also hidden from plotting commands issued by your GUI.
To issue plotting commands from your GUI, you should create a figure and axes, saving the handles (you can store them in the handles structure). You then parent the axes to the figure and then parent the graphics objects created by the plotting command to the axes. The following steps summarize this approach:
Parent property to the figure handle.
Parent properties to the handle of the axes.
The following code illustrates these steps:
fHandle = figure('HandleVisibility','off','IntegerHandle','off',... 'Visible','off'); aHandle = axes('Parent',fHandle); pHandles = plot(PlotData,'Parent',aHandle); set(fHandle,'Visible','on')
Note that not all plotting commands accept property name/property value specifications as arguments. Consult the reference page for the specific command to see what arguments you can specify.
| Axes | Renaming GUI Files and Tags | ![]() |