|MATLAB Function Reference|
Hold current graph in the figure
hold function determines whether new graphics objects are added to the graph or replace objects in the graph.
retains the current plot and certain axes properties so that subsequent graphing commands add to the existing graph.
resets axes properties to their defaults before drawing new plots.
off is the default.
toggles the hold state between adding to the graph and replacing the graph.
Test the hold state using the
Although the hold state is
on, some axes properties change to accommodate additional graphics objects. For example, the axes' limits increase when the data requires them to do so.
hold function sets the
NextPlot property of the current figure and the current axes. If several axes objects exist in a figure window, each axes has its own hold state.
hold also creates an axes if one does not exist.
on sets the
NextPlot property of the current figure and axes to
off sets the
NextPlot property of the current axes to
hold toggles the
NextPlot property between the
NextPlot property of axes and figure graphics objects.
Basic Plots and Graphs for related functions