Navigation

Operators and Keywords

Function List:

C++ API

Command: close
Command: close (h)
Command: close h
Command: close all
Command: close all hidden
Command: close all force

Close figure window(s).

When called with no arguments, close the current figure. This is equivalent to close (gcf). If the input h is a graphic handle, or vector of graphics handles, then close each figure in h.

If the argument "all" is given then all figures with visible handles (HandleVisibility = "on") are closed.

If the argument "all hidden" is given then all figures, including hidden ones, are closed.

If the argument "all force" is given then all figures are closed even when "closerequestfcn" has been altered to prevent closing the window.

Implementation Note: close operates by calling the function specified by the "closerequestfcn" property for each figure. By default, the function closereq is used. It is possible that the function invoked will delay or abort removing the figure. To remove a figure without executing any callback functions use delete. When writing a callback function to close a window do not use close to avoid recursion.

See also: closereq, delete.

Package: octave