next up previous contents index
Next: REAL FUNCTION SYMS Up: Description of Plotting Previous: SUBROUTINE SHADE

SUBROUTINE SYMBOL

The  SYMBOL routine plots an  ASCII string. Upper and lower case  characters can be plotted as well as special plotting symbols and characters. A list of symbols is shown in the last chapter. The plotting symbols 0 to 16 are centered vertically and horizontally, while other symbols have a reference point on the lower left edge of the character. Hence, i=-1 should be used for centered plot symbols 0 thru 16. The number of characters in the input string which should be plotted can be specified. If an ASCII null (0) is encountered in the string beyond the first position, the routine terminates.

The string can be plotted left-justified, centered, or right-justified. When the string is left-justified, the location of the end of the plotted string can be optionally returned. The length of the plotted string can be computed by calling SYMBOL first with i=-3 and computing the difference between the start and ending points of the string.

More elaborate characters and different fonts may be obtained using SYMS.  MASTER routines,  AXIS routines, and  NUMBER\ all use  SYMBOL characters. If the user desires to use  SYMS in place of SYMBOL throughout a program, the user can add the following routine to the program. The subroutine should be titled SYMBOL with the arguments described below. This routine simply passes the arguments (in the same order) to SYMS.

        SUBROUTINE SYMBOL(x,y,h,s,a,n,i)  ! symbol replacement
        INTEGER S(1)
        A = SYMS(x,y,h,s,a,n,i)           ! call syms
        RETURN
        END
CALL SYMBOL (x,y,h,s,a,n,i)

x,y   (R): location position (x,y returned if i=-2 or -3)
           If x=999 then x continued from last position in
           prior SYMBOL or NUMBER call. If y=999 then y continued.
h     (R): height of the string to be printed
s     (C): text to be plotted 
a     (R): angle at which the string is to be plotted
n     (I): number of characters in string s to plot
           = -2 : draws pen down to (x,y) before symbol plotted
           = -1 : plots a single symbol
           >  0 : number of characters to plot
i     (I): location flag
            = -3 : same as -2 but string is not plotted and
                   last position is not affected
            = -2 : same as -1 but returns end point in x,y
            = -1 : (x,y) is lower left corner of plotted string
            =  0 : (x,y) is center of plotted array
            =  1 : (x,y) is lower right corner of plotted string
            =  2 : no action



David Long
Wed Jun 12 10:34:11 MDT 1996