Understanding Annotation Objects and Data

You can add free-form annotations (such as text, lines, circles, images, and markers) to a graph. The annotation objects are rendered on top of the graph. Unlike titles and footnotes, annotation objects do not cause a graph to rearrange. However, annotation objects can be attached to data points in the plot area. If the graph is resized, the annotations move with the data points.
Whether an annotation is attached to the data depends on where the annotation was created in the graph, as described in the following table:
Location Determines Default Data Attachment
Annotation Location
Behaviors
Created totally within in the plot area
By default, the annotation object is attached to the data markers, lines, and so on, in the plot area. For example, suppose that you create a rectangle in the plot area next to a data marker. Suppose also that the graph changes due to the addition or removal of titles or footnotes. The location of the rectangle changes along with the location of the data marker even though the plot area might change in size. In other words, the rectangle location remains synchronized with the data location.
There are three exceptions:
  • Plots with a DATALATTICE or DATAPANEL layout do not support this data synchronization feature. Annotations that are added to these plots cannot be attached to data points.
  • Three-dimensional plots, such as surface plots, also do not support the data synchronization feature.
  • Image annotations cannot be attached to data points. They always behave as if they were created outside the plot area.
By default, if you move an annotation object that was created in the plot area beyond the plot area border, the annotation is cropped at the plot area boundary.
For most annotation objects, you can specify that annotations created inside the plot area act like annotations created outside the plot area (that is, they lose their data synchronization). For details, see Change the Data Attachment Properties of an Annotation.
Created totally outside plot area
By default, annotation objects created outside the plot area are positioned relative to the overall size of the graph. These annotation objects are not attached to the data in the plot area.
If the graph is resized, the annotation object maintains its position relative to the entire graph. For example, suppose you add a marker annotation to the bottom center of a graph (outside the plot area). If you resize the graph, the marker stays in the bottom center.
Annotation objects that are created outside the plot area and then moved inside the plot area do not become attached to the data.
Created both inside and outside the plot area
You can create a line or arrow that has one end inside the plot area and the other end outside the plot area. Only the end that was created within the plot area is attached to the data. If the graph is resized, the attached end stays with the data point.
Moving either end does not change the original data synchronization behavior. If you want the entire line to be synchronized with the data, you must create a new line that is entirely within the plot area.
All non-line annotation objects are attached to the data only if the starting position is in the data area. Unlike lines and arrows, the other annotation objects are either entirely attached to the data or not attached to the data.