clearpoints
Removes all the points of an animated line.
Category: Graphics > 2-D and 3-D Plots
Syntax
clearpoints(h)
Empties the animated line h; the line object remains.
Description
After clearing, the line is still in the axes with its color and width, ready to receive new points with addpoints. It is faster and tidier than deleting and recreating the line.
Input arguments
h- Handle returned by
animatedline.
Example
Clear and refill
h = animatedline;
addpoints(h, 1:5, (1:5).^2);
[x, y] = getpoints(h);
disp(numel(x))
clearpoints(h)
[x, y] = getpoints(h);
disp(numel(x))
Output
5
0