Retain current plot when adding new plots
hold on retains plots in the current axes
so that new plots added to the axes do not delete existing plots.
New plots use the next colors and line styles based on the ColorOrder and LineStyleOrder properties
of the axes. MATLAB® adjusts axes limits, tick marks, and tick
labels to display the full range of data. If axes do not exist, then
the hold command creates them.
hold off sets the hold state to off so
that new plots added to the axes clear existing plots and reset all
axes properties. The next plot added to the axes uses the first color
and line style based on the ColorOrder and LineStyleOrder properties
of the axes. This option is the default behavior.
hold all is the same as hold on.
This syntax will be removed in a future release. Use hold
on instead.
hold toggles the hold state between on
and off.
Use the ishold function to test
the hold state.
The hold function sets these properties: