12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure Propertiesthat is a valid <strong>MATLAB</strong> expression or the name of an M-file. The expressionexecutes in the <strong>MATLAB</strong> workspace.Childrenvector of handlesChildren of the figure. A vector containing the handles of all axes, uicontrol,and uimenu objects displayed within the figure. You can change the order ofthe handles and thereby change the stacking of the objects on the display.Clipping{on} | offThis property has no effect on figures.CloseRequestFcn string<strong>Function</strong> executed on figure close. This property defines a function that<strong>MATLAB</strong> executes whenever you issue the close command (either aclose(figure_handle) or a close all), when you close a figure window fromthe computer’s window manager menu, or when you quit <strong>MATLAB</strong>.The CloseRequestFcn provides a mechanism to intervene in the closing of afigure. It allows you to, for example, display a dialog box to ask a user toconfirm or cancel the close operation or to prevent users from closing a figurethat contains a GUI.The basic mechanism is:• A user issues the close command from the command line, by closing thewindow from the computer’s window manager menu, or by quiting <strong>MATLAB</strong>.• The close operation executes the function defined by the figureCloseRequestFcn. The default function is named closereq and is predefinedas:delete(get(0,'CurrentFigure'))This statement unconditionally deletes the current figure, destroying thewindow. closereq takes advantage of the fact that the close command makesall figures specified as arguments the current figure before calling therespective close request function.You can set CloseRequestFcn to any string that is a valid <strong>MATLAB</strong> statement,including the name of an M-file. For example,set(gcf,'CloseRequestFcn','disp(''This window is immortal'')')2-168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!