FUNCTION REFERENCE
gca
Handle of the current axes.
Handle of the current axes.
Syntax
h = gcaReturns the handle of the axes that plot commands use now, creating a figure and axes if none exists. It takes no arguments. Use it with get and set or with dot syntax: ax.XLim, ax.XLim = [0 5], ax.Title.String = 'T', ax.FontSize, ax.ColorOrder, ax.Colormap, ax.CLim, ax.XScale. Property names ignore case; an unknown name gives an "Unrecognized property" error.
Example
plot(1:3); h = gca; get(h, 'Type') % 'axes'Example
plot(1:3); ax = gca; ax.XLim = [0 4]; ax.Title.String = 'Data'; ax.XLim % [0 4]Differences from MATLAB: Not checked against MATLAB yet. Dot assignment needs one handle; use set for arrays of handles.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.