1.98 FAQ-491 How to customize the label added by the annotation tool?

Last Update: 3/31/2020

To customize a label added with the Annotation tool Button Data Annotation.png:

  1. Right-click on the label and select Properties.... This opens the Annotation dialog.
  2. In the Text tab, click the arrow button Arrow button annotaion.png to select a built-in format string from the context menu (an Examples sub-menu provides some more complex examples). Alternately, enter a string directly by typing or by using LabTalk Substitution Notation. You can use a combination of literal text and variables in your string (see figure).
    CustomizeAnnotation01.png
  3. To add your custom label to the built-in label options (i.e. for repeat use), click the Set as Default button before exiting the dialog box. Once saved, the format can be later brought up by repeatedly pressing TAB until "Custom" displays next to the Annotation tool cursor. See Custom Annotations.
    Custom Annotation Tooltip.png


Beginning with Origin 2017, you can hold down the ALT key and drag existing annotation labels from point to point and the label will automatically refresh. Begin by clicking the Pointer Button Pointer.png tool, press the ALT key, then use your mouse to drag the label to another data point.

For Version 2016, right-click on the annotation label and choose Customize Label. Choose a Label Form. When choosing Custom directly enter a Format Label string. Note that you can use the flyout menu button to the right to add variables to the label format.

For versions prior to 2016, Origin provides the option of customizing the annotation through script system.annotation.customlabel$=. After customizing the display form of the label, use the TAB key to toggle the annotation label options, that is, press the TAB key until the status bar (on the lower left of Origin workspace) reads current label: Custom....

Example: The following steps will change the display form of the annotation to Peak is at $(x), where $(x) will be substituted by the x value of the data point.

  1. Open the Script window from Window: Script Window.
  2. Type system.annotation.customlabel$="Peak is at $(x)"; in the Script Window and press ENTER.
  3. Click the Annotation buttonButton Data Annotation.png to activate the annotation tool.
  4. Move the cursor on the graph and press the TAB key until the status bar reads current label:Custom (Peak is at $(x)).
  5. Double click on the plots to add an annotation.
  6. The result would be like the graph below.
    CustomizeAnnotation.png

You can also refer to the video tutorial of Data Annotation Tool Customization for more details.


Keywords:Annotation, Custom label, Custom annotation