4 Labels

The following examples show how to add labels to and to manually move labels in a plot. These examples use the same plot layout shown in Figure 8 but with the tick format on the bottom axis set to INSIDE rather than SPAN.

4.1 Basic Labeling


PIC

Figure 11: Basic Labeling of a plot


This example shows how to add and position labels within a plot as well as how to include unicode characters and internal variables in a label. The labels are defined in the PLOT LABELS menu. A subset of the option settings for each label definition are shown in the text window but to see the full set of option settings hilight the label entry and the click on EDIT to copy the settings into the work area.

The first four labels are standard axis labels. Each is centered on its respective axis and output exterior to the plot box. The Y axis labels have an X offset of 1.5 characters and the X axis labels have a Y offset of 1.5 characters. The offsets move the labels away from their respective axes in the direction indicated by the Pos option.

The label in slot 4 shows how to include an internal variable in a label. The variable $apANS(miFile) contains the name of the input menu file. The label is output with a point size of 8 in the lower right-hand corner of the plot window.

The label in slot 5 shows the use a predefined label (_SE_TiMe_). This label holds the start and stop time entered by the user in the Time Definition Menu. The label is output inside its anchor axis.

The label in slot 6 contains a unicode character, in this case a downward pointing arrow. Note the large point size used as well as the custom color.

The last three label definitions demonstrate the effects of label justification. Each is centered on the lower axis and then justified according to its label. The last label in the group was moved upward 1.5 characters to prevent it from overlapping the lower two. The LEFT and RIGHT labels clearly show how the anchor point automatically shifts beyond any tick marks and numerical annotation in the direction of output.

4.2 Manually Moving a Label


PIC

Figure 12: Basic Labeling of a plot


You can manually reposition any label in the plot window by placing the cursor over the label, left click, move the cursor to the position that you want the label moved and then right click. The selected location becomes the new label anchor point and the label is justified to that point according to its Justify option setting. This was done to the downward pointing arrow in Figure 11 moving it to above the T is RIGHT as shown in Figure 12.

Moving a label modifies its PlotID, X-Off, and Y-Off option settings in the Label Menu as seen in the menu. The PlotID option will be set to _PW_ which indicates that the label anchor position is given in absolute coordinates in the parent plot window. The new coordinates are given in the X-Off, and Y-Off option settings. When you move a label you need to re-save the menu so that the label will appear in its new position the next time UDFAnalysis is invoked using this menu as input. Note: The Anchor and Pos options are not used when outputting a manually positioned label and the Axis option is only used to determine the direction the label is output: horizontal if an X axis is selected and vertical for a Y axis.

It should be emphasized that when a label is positioned absolutely in a window, changing the window size will cause the label to be repositions with respect to the plots in the window. Anchoring a label to a plot is generally a better positioning method since it overcomes the rescaling problem.