ANNOTATE /USER /NORM /NOUSER /XPOS /YPOS /HALIGN /VALIGN /ANGLE /SIZE
Places a label on a plot page. Qualifiers locate the label and set its size.
yes? ANNOTATE/XPOS=0/YPOS=0[/qualifiers] label_text
If the label text contains spaces, enclose it in quotes.
yes? ANNOTATE/USER/YPOS=48.85/XPOS=2.35/HALIGN=-1/SIZE=0.1 Paris yes? ANNOTATE/NORM/XPOS=0.5/YPOS=1/HALIGN=0 "Along the upper axis" yes? ANNOTATE/NORM/XPOS=0.5/YPOS=0.5/HALIGN=0/VALIGN=0 CENTER
ANNOTATE is similar to LABEL, but with the convenience of command qualifiers and some additional controls. As with LABEL, the text can be positioned using world coordinates (user units), or page units, "inches". In addition a new method is introduced, "Normalized" positioning. This positioning is relative to the plot axes, treating them as a unit square.
ANNOTATE may only be given when a plot has been drawn. See DEFINE ANNOTATION for setting labels in a PLOT/SET sequence.
The argument to ANNOTATE is the text for the label. If the text contains spaces, enclose it in quotes.
The location for the label. These qualifiers are required. XPOS refers to the horizontal axis, YPOS to the vertical axis. See /USER /NOUSER and /NORM for the units
Is the angle in degrees for the label, with 0 at 3 o'clock (default 0).
Is the size of the text in inches (default 0.2).
Specifies that the position given by /XPOS and /YPOS is in user-units, e.g. world coordinates. (this is the default).
Specifies that the position is in inches measured from the plot origin. These are the plot inches used in PPLUS commands.
Indicates that the positioning is relative to a unit "square" defined by the plot axes. Thus the plot origin is /XPOS=0/YPOS=0; the upper left corner of the axes is /XPOS=0/YPOS=1; the center of the plot is /XPOS=0.5/YPOS=0.5, and so forth
/HALIGN=Is the horizontal alignment for the label. See the discussion below for further settings.
- HALIGN= 0 centers the label horizontally
- HALIGN=-1 left-justifies it (the default)
- HALIGN= 1 right-justifies it.
/VALIGN=Is the vertical alignment. See the discussion below for further settings.
- VALIGN= 0 centers the label vertically at the location
- VALIGN=-1 draws it on top of the location (the default)
- VALIGN= 1 places it just below the location.
/HALIGN and /VALIGN are relative to the line along which the label is drawn; so /ANGLE=45/HALIGN=1 will align the label with the end of the label at the anchor point, drawn at a 45 degree angle. /VALIGN=1 will move it up or down relative to the label being drawn.
/HALIGN and /VALIGN may take values other than 0, 1, and -1. These will move the label by a half-character per integer unit in the direction indicated by the sign of the number. So, a label with VALIGN=3 is top-aligned, and starts a full character-height below the anchor point. A label with HALIGN=3 is right-aligned and ends a full character-height
to the left of the anchor point. HALIGN first moves the label left or right according to the sign, and then further adjusts if the values are less than -1 or more than 1.
See the chapter "Customizing Plots", section Labels for examples. Examples can be found in the demo script
yes? go annotate_demo.jnl