| MATLAB Function Reference | ![]() |
openfig('filename.fig','new')
openfig('filename.fig','new','visible')
openfig('filename.fig','new','visible')
openfig('filename.fig','reuse')
openfig('filename.fig')
openfig(...,'PropertyName',PropertyValue,...)
figure_handle = openfig(...)
openfig is designed for use with GUI figures. Use this function to:
Open the FIG-file creating the GUI and ensure it is displayed on screen. This provides compatibility with different screen sizes and resolutions.
Control whether MATLAB displays one or multiple instances of the GUI at any given time.
Return the handle of the figure created, which is typically hidden for GUI figures.
openfig('filename.fig','new') opens the figure contained in the FIG-file, filename.fig, and ensures it is visible and positioned completely on screen. You do not have to specify the full path to the FIG-file as long as it is on your MATLAB path. The .fig extension is optional.
openfig('filename.fig','new','invisible') or openfig('filename.fig','reuse','invisible') opens the figure as in the preceding example, while forcing the figure to be invisible.
openfig('filename.fig','new','visible') or openfig('filename.fig','new','visible') opens the figure, while forcing the figure to be visible.
openfig('filename.fig','reuse') opens the figure contained in the FIG-file only if a copy is not currently open; otherwise openfig brings the existing copy forward, making sure it is still visible and completely on screen.
openfig('filename.fig') is the same as openfig('filename.fig','new').
openfig(...,'PropertyName',PropertyValue,...) opens the FIG-file setting the specified figure properties before displaying the figure.
figure_handle = openfig(...) returns the handle to the figure.
If the FIG-file contains an invisible figure, openfig returns its handle and leaves it invisible. The caller should make the figure visible when appropriate.
guide, guihandles, movegui, open, hgload, save
See Deploying User Interfaces in the MATLAB documentation for related functions
![]() | open | opengl | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |