Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

gcf - Current figure handle

Syntax

h = gcf

Description

h = gcf returns the handle of the current figure. The current figure is the figure window in which graphics commands such as plot, title, and surf draw their results. If no figure exists, the MATLAB software creates one and returns its handle. You can use the statement

get(0,'CurrentFigure')

if you do not want MATLAB to create a figure if one does not already exist.

See Also

clf, figure, gca

Root CurrentFigure property

Graphics Object Identification for related functions

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS