8.7.2 Labeling Plots using the Annotation ToolCreating_Annotation
For global labeling of 2D plots (also labeling of individual data points), see Labeling Plots using Label tab or Mini Toolbars.
For precise picking and labeling specific points on 2D and Contour plots, you can use the customizable Annotation tool.
Creating a standard annotation
- Click on the Annotation button on the Tools toolbar.
- Hover on the graph window and 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 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 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
To customize an existing annotation, right-click on the label and select Properties…. This opens the Annotation dialog box:
- As any other text objects, you can edit and format the text of the annotation in Text tab and its frame and background in Frame tab.
- The leader line is a line object attaches an annotation object to its data point. If you want change the style of a leader line, go to Leader Line tab.
- Once an annotation object is created, you can drag it anywhere in the graph page, and the leader line connecting the label to the data point will follow.
- You can move an annotation object to another data point by pressing the ALT key and dragging the object to a new data point. The label will update automatically.
Custom annotations
In addition to the standard annotations, you can add a single custom annotation string that can incorporate arbitrary text and LabTalk variables. When you define a custom string, it becomes one of your TAB key labeling options, identifiable by the tag "Custom".
- Select the Annotation tool and label a data point on the graph.
- Switch to your Pointer tool , then right-click on the annotation object and choose Properties.
- In the Annotation dialog box, Text tab, add your custom annotation string in the edit box. Note that while you are in the edit box, you can click the flyout button to the right of the box and insert LabTalk variables into your string.
- To save the custom string and add it to your labeling options, click the Set as Default button before you OK out of the dialog box.
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:
- Start with a fresh worksheet, select both columns then right-click and Fill Columns with Random Numbers.
- Click the Scatter button on the 2D Graphs toolbar.
- 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.
- Click on the Annotation tool , select any point and double-click on the point to add an annotation label.
- Select the Pointer tool , right-click on the label and choose Properties.
- 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 Y axis major tick label format, you can enter $(x), $(y,yt) .
- 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.
|