animatedline
Create animated line.
📝Syntax
an = animatedline()
an = animatedline(x, y)
an = animatedline(x, y, z)
an = animatedline(ax, ...)
an = animatedline(..., propertyName, propertyValue)
📥Input Arguments
Parameter Description
x, y, z numeric coordinates: scalars or arrays with the same number of elements.
ax target axes or group object.
propertyName a scalar string or character vector.
propertyValue a property value.
📤Output Arguments
Parameter Description
an a graphics object: animatedline type.
📄Description

animatedline creates an animated line with no stored points.

animatedline(x, y) creates an animated line initialized with two-dimensional coordinates.

animatedline(x, y, z) creates an animated line initialized with three-dimensional coordinates.

Use addpoints, clearpoints, and getpoints to mutate or query the stored coordinates.

MaximumNumPoints limits the number of stored points. When the limit is reached, older points are discarded.

See animatedline properties for the complete property list.

💡Examples
f = figure();
ax = axes('Parent', f);
an = animatedline(ax, 'Color', [0 0.4 0.8], 'LineWidth', 2);
x = linspace(0, 2*pi, 120);
addpoints(an, x, sin(x));
drawnow
🔗See Also
animatedline propertiesaddpointsclearpointsgetpointscomet
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub