FUNCTION REFERENCE

animatedline

Line for points added in a loop.

Line for points added in a loop.

Syntax

h = animatedline

Syntax

h = animatedline(x, y)

Syntax

h = animatedline(x, y, z)

Syntax

h = animatedline(..., 'MaximumNumPoints', n, Name, Value)

Adds an empty (or initial) line to the current axes, whatever hold says. addpoints appends points, getpoints returns them, clearpoints removes them; when more than MaximumNumPoints are stored, the oldest are dropped. Call drawnow to show the new points while a loop runs. Other Name,Value pairs are plot's line properties.

Example

h = animatedline(); for k = 1:10, addpoints(h, k, k^2); end; [x, y] = getpoints(h); y(end)   % 100

Differences from MATLAB: the handle's Type is 'line'; MaximumNumPoints can only be given when the line is created (at most 1000000).

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.