AnimatedLine - Line animation appearance and behavior - MATLAB (original) (raw)

AnimatedLine Properties

Line animation appearance and behavior

AnimatedLine properties control the appearance and behavior of an AnimatedLine object. By changing property values, you can modify certain aspects of the line. Use dot notation to refer to a particular object and property:

an = animatedline; c = an.Color; an.Color = 'red';

Color and Styling

expand all

Series index, specified as a positive whole number or "none". This property is useful for reassigning the colors, line styles, or markers ofAnimatedLine objects so that they match other objects.

By default, the SeriesIndex property is a number that corresponds to the order in which the AnimatedLine object was created, starting at1. MATLAB uses the number to calculate indices for automatically assigning color, line style, or markers when you call plotting functions. The indices refer to the rows of the arrays stored in the ColorOrder andLineStyleOrder properties of the axes. Any objects in the axes that have the same SeriesIndex number also have the same color (and line style and markers, if applicable).

A SeriesIndex value of "none" corresponds to a solid line with a neutral color that does not participate in the indexing scheme.

How Manually Setting Colors, Line Styles, or Markers Overrides SeriesIndex Behavior

To manually control the color, line style, and markers, set theColor, LineStyle, andMarker properties of the AnimatedLine object.

When you manually set these properties of an object, MATLAB disables automatic color, line style, and marker selection for that object and allows your selection to persist, regardless of the value of theSeriesIndex property. The ColorMode,LineStyleMode, and MarkerMode properties indicate whether the colors, line styles, and markers have been set manually (by you) or automatically. For each of these mode properties, a value of"manual" indicates manual selection, and a value of"auto" indicates automatic selection.

To enable automatic selection again, set the ColorMode,LineStyleMode, MarkerMode, or all three properties to "auto", and set theSeriesIndex property to a positive whole number.

In some cases, MATLAB sets the SeriesIndex property to0, which also disables automatic selection.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Markers

expand all

Marker size, specified as a positive value in points, where 1 point = 1/72 of an inch.

Legend

expand all

Legend label, specified as a character vector or string scalar. The legend does not display until you call the legend command. If you do not specify the text, then legend sets the label using the form'dataN'.

Interactivity

Callbacks

Callback Execution Control

expand all

This property is read-only.

Parent/Child

expand all

Parent, specified as an Axes,PolarAxes, GeographicAxes,Group, or Transform object.

The object has no children. You cannot set this property.

Identifiers

expand all

This property is read-only.

Type of graphics object, returned as 'animatedline'. Use this property to find all objects of a given type within a plotting hierarchy, for example, searching for the type using findobj.

Object identifier, specified as a character vector or string scalar. You can specify a unique Tag value to serve as an identifier for an object. When you need access to the object elsewhere in your code, you can use the findobj function to search for the object based on the Tag value.

Version History

Introduced in R2014b

expand all

Control how AnimatedLine objects vary in color, line style, and markers by setting the SeriesIndex property. This property is useful when you want to match the colors, line styles, and markers of different objects in the axes.

Setting or getting UIContextMenu property is not recommended. Instead, use the ContextMenu property, which accepts the same type of input and behaves the same way as theUIContextMenu property.

There are no plans to remove the UIContextMenu property, but it is no longer listed when you call the set, get, orproperties functions on the AnimatedLine object.