Accelerating the pace of engineering and science

• Trials

# Annotation Line Properties

Define annotation line properties

## Modifying Properties

You can set and query annotation object properties using the set and get functions and the Property Editor (displayed with the propertyeditor command).

Use the annotation function to create annotation objects and obtain their handles. For an example of its use, see Annotation Objects in the MATLAB® Graphics documentation.

## Annotation Line Property Descriptions

This section provides a description of properties. Curly braces { } enclose default values.

Color

ColorSpec

Color of the object. A three-element RGB vector or one of the MATLAB predefined names, specifying the object's color. The default value is [0 0 0] (black).

See the ColorSpec reference page for more information on specifying color.

LineStyle

{-} | -- | : | -. | none

Line style of annotation line object.

LineWidth

size in points

Width of linear objects and edges of filled areas. Specify in points. 1 point = 1/72 inch. The default is 0.5 points.

Position

four-element vector [x, y, width, height]

Size and location of the object. Specify the lower left corner of the object with the first two elements of the vector defining the point x, y in units normalized to the figure (when Units property is normalized). width and height specify the object's dx and dy, respectively, in units normalized to the figure. The default value is [0.3 0.3 0.1 0.1].

Units

{normalized} | inches | centimeters | characters | points | pixels

Position units. MATLAB uses this property to determine the units used by the Position property. All positions are measured from the lower left corner of the figure window.

• normalized — Interpret Position as a fraction of the width and height of the parent axes. When you resize the axes, MATLAB modifies the size of the object accordingly.

• pixels, inches, centimeters, and points — Absolute units. 1 point = 1/72 inch.

• characters — Based on the size of characters in the default system font. The width of one characters unit is the width of the letter x, and the height of one characters unit is the distance between the baselines of two lines of text.

X

vector [Xbegin Xend]

x-coordinates of beginning and ending points for line. A vector of x-axis (horizontal) values specifying the beginning and ending points of the line, units normalized to the figure. The default value is [0.3 0.4].

Y

vector [Ybegin Yend]

y-coordinates of beginning and ending points for line. A vector of y-axis (vertical) values specifying the beginning and ending points of the line, units normalized to the figure. The default value is [0.3 0.4].