hold
Retain current plot when adding new plots.
📝Syntax
hold('on')
hold('off')
hold('all')
hold()
hold(ax, ...)
📥Input Arguments
Parameter Description
'on' turn hold on.
'off' turn hold off.
'all' same as hold on.
ax Target axes: axes.
📤Output Arguments
Parameter Description
ax a graphics object: axes type.
📄Description

hold allows to construct a plot sequence incrementally.

💡Examples
f = figure();
x = linspace(-pi, pi);
y1 = cos(x);
plot(x, y1)
hold on
y2 = sin(x);
plot(x, y2)
hold off
Example illustration
🔗See Also
isholdnewplot
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub