8.8.2 Labeling Plots using the Annotation Tool


For global labeling of 2D plots (also labeling of individual data points), see .

For precise picking and labeling specific points on 2D and Contour plots, you can use the customizable Annotation tool.

Another way to selectively label data points is by using Plot Details controls for .

Contents

Creating a standard annotation

  1. Click on the Annotation button on the Tools toolbar. (2025b)You can use the Labtalk command dotool 100 to start the annotation tool in graph.
  2. In the opened dialog Annotataion which shows up with the annotation cursor, you can choose the label form, font, font size and font color for the labels you are going to add.
  3. Hover on the graph window and you can use the TAB key to toggle between annotation options (options visible on the Annotation cursor or on the Status bar at the lower-left side of the workspace).


2D XY data plots:

Annotation Form Cursor
($(x), $(y)) or other custom form
(X coordinate value, Y coordinate value)
(X coordinate value, Y coordinate value) [index number]
X coordinate value
Y coordinate value
Index number (row number)


Contour plots:

Annotation Form Cursor
($(x), $(y), $(z)) or other Custom Form
(X coordinate value, Y coordinate value, Z coordinate value)
(X coordinate value, Y coordinate value, Z coordinate value) [Row index number]
(X coordinate value, Y coordinate value, Z coordinate value) [Row index number] [Column index number]
X coordinate value
Y coordinate value
Z coordinate value
Index number (row number)
(Index number (row number),Index number (column number))


When you select a data point of a data plot, you can click on the data plot, and then press ← and → on keyboard to cycle among data points.

Editing an annotation

Pre-define the style and label form of annotations

Once you clicked the Annotation button , a mini dialog Annotation will show up to let you choose a label form and set the styles of the labels.

customize an existing annotation

To customize an existing annotation, you can use the Mini toolbar or Properties… dialog:

Using Mini Toolbar

Using Properties… dialog

Right-click on the label and select Properties…. This opens the Annotation dialog box:

Using Other Controls

Custom annotations

In addition to the standard annotations and predefined custom annotation in the list, you can add a single custom annotation string that can incorporate arbitrary text and LabTalk variables in the Label box and then add the annotation. Or you can add an standard annotation firstly, and then right-click it to open the Annotation dialog box to customize the label content in Text tab.

Example 1: Show Formula-Adjusted value as Annotation

In this example, we will use the Axis dialog box Formula box to create a custom tick label, then customize the Annotation tool to display the "formula" value instead of the actual value of the Y axis:

  1. Start with a fresh worksheet, select both columns then right-click and Fill Columns with Random Numbers.
  2. Click the Scatter button on the 2D Graphs toolbar.
  3. Double-click on the Y axis labels and in the Axis dialog box Display tab, enter x*pi into the Formula box and click OK. Note that the Y axis tick labels are now adjusted to display your according to the entered formula.
  4. Click on the Annotation tool , select any point and double-click on the point to add an annotation label.
  5. Select the Pointer tool , right-click on the label and choose Properties.
  6. In the text box, enter the string $(x), $(y,y) and click the Set as Default button before you OK out of the dialog box. Note that the label now properly displays the formula-adjusted value of the Y axis and if you want to show the label in the , you can enter $(x), $(y,yt).
  7. Reselect the Pointer tool then press the ALT key and drag the custom label to another data point in the graph. Note that the annotation label updates with the new point coordinates.

Example 2: Show Image as Annotation

Besides annotating the points with cell values or strings, you are also allowed to show embedded images as annotation labels.

Labels created with the Annotation tool are text objects that use to display a numeric value, a text string or an embedded image; As such, they support customizations beyond those discussed here. For more information, see and , both in the LabTalk Programming Guide.