MATLAB Functions | Help Desk |
gca
Get current Axes handleh = gca
h = gca
returns the handle to the current Axes for the current Figure. If no Axes exists, MATLAB creates one and returns its handle. You can use the statement,
get(gcf,'CurrentAxes')if you do not what MATLAB to create an Axes if one does not alread exist. The current Axes is the target for graphics output when you create Axes children. Graphics commands such as
plot
, text
, and surf
draw their results in the current Axes. Changing the current Figure also changes the current Axes.
axes
, cla
, delete
, gcf
, gcbo
, gco
, hold
, subplot
, findobj
Figure CurrentAxes
property