MATLAB Functions Help Desk

gca

Purpose

Get current Axes handle

Syntax

Description

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,

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.

See Also

axes, cla, delete, gcf, gcbo, gco, hold, subplot, findobj Figure CurrentAxes property

[ Previous | Help Desk | Next ]