10 Plotting Character Strings

AUTOGRAPH provides for multiline labels in one of several predefined regions of the plot, but can be awkward to use for placing character strings in arbitrary places. The SPPS routine WTSTR is more suitable for this purpose, but operates in user (i.e. data) coordinates, not appropriate for plotting outside the grid window, and expresses the character size in low level “plotter units". Character strings can, of course, be plotted directly through GKS or SGS, though access to the special NCAR fonts will not be available.

The Starlink extension routine SNX_WTRST is a further method of plotting strings. The call is as follows:

        CALL SNX_WRTST( XG, YG, STRING, HG, JOR, JCTR )

XG,YG (real) is the position of the string in grid coordinates. STRING is the character string to be plotted, and may contain PWRITX codes (see §7) if special characters are required. This option requires linking with the AGPWRITX version of AGPWRT (see §3). HG (real) is the character height in grid Y units. JOR (integer) is the string orientation, in degrees anticlockwise from the usual left-to-right. JCTR (integer) describes the justification; 2 and 1 = left, 0 = centred, +1 and +2 = right, where “left" means “the middle of the left edge of the leftmost character is at XG,YG" etc. The values 0 and ± 2 produce proportionally-spaced strings and allow fancy characters to be used; ± 1 produces monospaced strings consisting of ordinary letters (including lowercase), numbers and punctuation characters. You would use ± 1 for plotting a table – the AUTOGRAPH numeric labels are plotted using this value. There is no provision for centred monospaced strings.