ishold

Current hold state

Syntax

tf = ishold
tf = ishold(ax)

Description

tf = ishold returns the hold state of the current axes. The return state is 1 if hold is on, and 0 if it is off. When hold is on, the current plot and most axes properties are held so that subsequent graphing commands add to the existing graph. If there is no figure, ishold returns 0 and MATLAB® creates a new figure.

tf = ishold(ax) returns the hold state of the specified Axes object or GeographicAxes object.

A state of hold on implies that both figure and axes NextPlot properties are set to 'add'.

Introduced before R2006a