Top of Page
Skip main navigation

PSPLOT Software

PostScript for Technical Drawings

Intended for users interested in generating technical drawings or graphics for technical journals in PostScript format. The manual describes PSPLOT, a library of Fortran-callable subroutines which can be combined in a calling program to produce PostScript plot files. The purpose, syntax, and calling convention of each subroutine is presented , along with plotting examples.

PostScript is a very robust graphics and typesetting language with wide-ranging capabilities. Since the focus of the subroutines in this library is to produce technical drawings, many of the "artistic" features of PostScript have not been addressed or included here.

The name PostScript is a registered trademark of Adobe Systems Incorporated. All instances of the name PostScript in this manual are references to the PostScript language as defined by Adobe Systems Incorporated.

PSPLOT is distributed free of charge for non-commercial use.

A Fortran 95 version of the software is available for download with associated documentation.  This version is not maintained, supported, or guaranteed by NSU OC and any technical inquiries should be directed to dregonjanos@gmail.com.

DOWNLOAD PSPLOT

  • A library of Fortran-callable subroutines.
  • Written in Fortran-77.
  • Supports the standard 35 PostScript fonts
  • Supports color
  • Platform independent
  • Creates publication-quality graphics
  • Allows total control of your plots
  • Distributed free of charge for non-commercial use
  • A pushbutton graphics library. That is, you can't create a graph with a single call.
  • A screen viewer. Output is in the form of PostScript files only. However, you can view the output plots with GhostScript.

This section will present the conventions used by the plotting subroutines in the PSPLOT plotting library. This information can be used to create customized plotting subroutines.

A plotting session is a set of plotting instructions in a user's application program which produces hardcopy graphic display output. The output can be either a single plot or graph or a set of graphs. Every plotting session must begin with a call to subroutine PSINIT (with the exception of a call to NEWDEV) and end with a call to subroutine PLOTND.

Pen movement is occasionally mentioned throughout this manual. While PostScript does not use an actual pen for graphic production, it is useful to visualize the plot commands as directing the movements of a pen of variable thickness to a specified (x,y) coordinate, with the pen being either up or down. The plotting subroutines are simple, user-callable commands which direct the movements of an imagined pen upon a plotting sheet.

The initial coordinate origin is approximately .5 inches from the bottom and left paper edges. The orientation of the page must be specified to be either portrait (short side horizontal) or landscape (long side horizontal) and is set by the call to PSINIT (which see). The figure below shows the paper orientation and beginning plot origin for portrait and landscape modes. The current plot origin can be relocated to other positions during the plotting session to provide new reference points for subsequent plotting commands. When the next graph is started, the new origin should be placed far enough away to avoid overlapping the just-completed graph.

All plotting commands use an absolute plot coordinate system. This means that all coordinates passed to plotting subroutines are expected to be in terms of distance from the current plot origin. This is contrast to a relative plot coordinate system, in which coordinates are assumed to be in terms of distance from the current pen position.

In all plotting subroutines, plot coordinates, character heights, distances, etc. can be in arbitrary units. The default is inches. This can be changed by the variable conver in subroutine PSINIT.

Unless otherwise noted, any subroutine argument which specifies an angle is stated in degrees relative to the X axis, with positive angles measured counterclockwise from the X axis.

Most character variables are specified as Hollerith, rather than character strings. The reason for this is primarily historical, combined with the fact that the enormous amount of code already written and in use at my site precluded a comprehensive revision. This should not cause any problems, however.

The initial font of a plot session is Helvetica, with a size of 12 points. This can be changed permanently in subroutine PSINIT. Of course, the current font can always be changed with subroutine SETFNT. PSPLOT supports the standard 35 fonts found on most PostScript printers.

PSPLOT supports color, although all examples in this manual are shown in grayscale for the purposes of reproduction. Color is specified in the relevant subroutines as red, green, and blue (RGB) values.

Continuation allows you to append a character string or number to the end of a previously plotted string or number. The coordinates of the appended string are automatically calculated. Whether or not a subroutine supports continuation is stated in subroutine description in the next section.

Continuation is specified by setting the X and/or Y coordinate argument in calls to the subroutines listed above to 999, and may be applied to X and Y coordinates separately. A subroutine call with continuation must immediately follow the previous plotting call. Continuation is useful when plotting strings containing variable values, such that the resultant string length is not known beforehand.

For example,

ND=10
CALL KEKNUM (1., 2., .15, FLOAT(ND), 0., -1, 0)
CALL KEKSYM (999., 999., .15, 5H DAYS, 0. ,5, 0)

produces "10 DAYS".

This section describes the user-level subroutines in the PSPLOT plotting library. These routines are Fortran-callable from an application program. Below is a brief summary of the subroutines, followed by an alphabetical listing of each subroutine containing a more detailed description of its function, syntax, and calling arguments.

Note that the code examples here are shown in black and white and grayscale, as that is how they are produced in the hardcopy User's Manual. PSPLOT fully supports color graphics.

Purpose: ARC draws an arc having a specified radius and arc center. Code Example

Syntax: CALL ARC (XC, YC, RAD, ANG1, ANG2)

Arguments:

  • XC, YC X, Y coordinates of the center of the arc.
  • RAD Radius of arc.
  • ANG1 Angle of arc beginning.
  • ANG2 Angle of arc ending.
Purpose: AROHED draws an arrowhead at a specified location. Code Example

Syntax: CALL AROHED (XPP, YPP, DIR, AROLNP, SPRANG, LOCXY)

Arguments:

  • XPP, YPP, X, Y coordinates of the tip of the arrowhead.
  • DIR Direction of arrowhead, measured east from north.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.
Purpose: ARROW draws an arrow, with vector length, at a specified location. Code Example

Syntax: CALL ARROW (XSS, YSS, XPP, YPP, AROLNP, SPRANG, LOCXY )

Arguments:

  • XSS, YSS X, Y coordinates of the vector length origin.
  • XPP, YPP X, Y coordinates of the tip of the arrowhead.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.
Purpose: AXIS draws an axis of a graph, with user-specified axis titles. Tick marks are drawn with a spacing of one inch. Code Example

Syntax: CALL AXIS (XPP, YPP, IBCD, NC, AXLEN, THETA, RMIN, DEL)

Arguments:

  • XPP, YPP X, Y coordinates of axis origin.
  • IBCD Axis title (Hollerith).
  • NC Number of characters in title. Its sign is used to specify on which side of the axis the title is to appear: positive for the counterclockwise side of the axis, negative for the clockwise side. Positive labeling is generally used for Y axes, negative for X axes.
  • AXLEN Length of axis.
  • THETA Angle of axis. Generally, 0 for X axes, 90 for Y axes.
  • RMIN The starting value and annotation of the first tick mark.
  • DEL The data value increment between tick marks.
Purpose: BLKSTP strips out embedded blanks in a character string. It returns the new character string and the number of characters in the new string.

Syntax: CALL BLKSTP (STR1, NDIM, STR2, NC)

Arguments:

  • STR1 Input character string.
  • NDIM Maximum length of STR1 as stated in calling program.
  • STR2 Output character string with embedded blanks removed.
  • NC Number of characters in STR2.
Purpose: BORDER draws a rectangular border with tick marks. The lower left corner of the border is located at the current plot origin. Code Example

Syntax: CALL BORDER (XLEN, YLEN, ITIC, IBRD, MAJX, MINX, MAJY, MINY)

Arguments:

  • XLEN Length of x-direction side of border.
  • YLEN Length of y-direction side of border.
  • ITIC Four digit number which determines which of the border sides will contain tick marks. Each of the digits is either 0 or 1, and if set to 1, that side will contain tick marks. The border sides are ordered as follows:
  • Left-vertical Bottom Right-vertical Top
  • For example, if ITIC = 1011, all sides except the bottom would contain tick marks. Additionally, if ITIC < 0, the tick marks will be drawn on the outside of the border than on the inside (default).
  • IBRD IBRD is similar to ITIC except that it determines which sides of the border will be drawn. Hence, you can have tick marks with no border, and vice versa.
  • MAJX Number of major divisions in the x-direction. A longer tick mark is drawn for these divisions.
  • MINX Number of minor divisions in the x-direction, i.e. the number of divisions per major division. A shorter tick mark is drawn for these divisions.
  • MAJY Same as MAJX in y-direction.
  • MINY Same as MINX in y-direction.
Purpose: CHOPIT logically closes the current graphics page and begins a new one.

Syntax: CALL CHOPIT (XPP, YPP)

Arguments:

  • XPP, YPP, X, Y coordinates of the initial plot origin of the next plot. This allows you to begin all plots at the same origin on each page.

Note: XPP and YPP are coordinates independent of the current scaling factor. That is, XPP and YPP represent actual inches, not scaled coordinates. The current scaling factor is reinstated after the new coordinate origin is set.

Subroutine CHOPIT should not be confused with subroutine PLOTND, which is called once at the end of each plotting session and which closes the entire output PostScript file.

Purpose: CIRCLE draws a circle. Code Example

Syntax: CALL CIRCLE (XC, YC, RAD, FILL)

Arguments:

  • XC, YC X, Y coordinates of the center of the circle.
  • RAD Radius of the circle.
  • FILL Logical value. If FILL=.TRUE., circle is filled with the current color or gray scale; otherwise it is outlined.
Purpose: CLIP inserts the PostScript command clip into the output file.

Syntax: CALL CLIP

Arguments: None.

Note: Most uses of this command are bracketed by calls to GSAV and GREST.

Purpose: CLIPBOX defines a clipping region. Code Example

Syntax: CALL CLIPBOX (XPTS, YPTS, NPTS)

Arguments:

  • XPTS Array containing x-coordinates of region path.
  • YPTS Array containing y-coordinates of region path.
  • NPTS Number of points in region path.
Purpose: COLBOX fills a region with a specified color.

Syntax: CALL COLBOX (XPTS, YPTS, NPTS, RED, GREEN, BLUE)

Arguments:

  • XPTS Array containing x-coordinates of region path.
  • YPTS Array containing y-coordinates of region path.
  • NPTS Number of points in region path.
  • RED Red value of specified color in RGB color model.
  • GREEN Green value of specified color in RGB color model.
  • BLUE Blue value of specified color in RGB color model.
  • ARGUMENTS RED, GREEN, and BLUE must lie between 0. and 1.0, inclusive.
Purpose: CONCOLR draws color contour plots of a two-dimensional array of regularly spaced data.

Syntax: CALL CONCOLR (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, COLOR, NVAL, IOFFP, SPVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONCOLR assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT,JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. Unlike in subroutine CONREC, NVAL cannot equal 0.
  • COLOR Array dimensioned (3,NVAL) containing the red, green, and blue values for each of the contour levels. The red value is stored in (1,n), the green value in (2,n) and the blue value in (3,n), where n specifies the contour index corresponding to CVAL. Regions less than or equal to the corresponding contour value CVAL are filled with the corresponding RBG values.
  • NVAL Number of contour intervals. NVAL must be less than or equal to 100, and unlike in CONREC, NVAL cannot equal 0.
  • IOFFP Flag indicating that grid boxes whose vertices have the value SPVAL are to be ignored during contouring.
  • SPVAL Special value denoting which grid boxes are to be ignored during contouring.
  • See coding example for CONFILL.
Purpose: CONFILL draws grayscale contour plots of a two-dimensional array of regularly spaced data. Code Example

Syntax: CALL CONFILL (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, GRYLEV, NVAL, IOFFP, SPVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONFILL assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT, JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. Unlike subroutine CONREC, NVAL cannot equal 0.
  • GRYLEV Array dimensioned (NVAL) containing the grayscale values for each of the contour levels. Regions less than or equal to the corresponding contour value CVAL are filled with the corresponding grayscale values. Grayscale values range from 0. (black) to 1.0 (white).
  • NVAL Number of contour intervals. NVAL must be less than or equal to 100, and unlike in CONREC, NVAL cannot equal 0.
  • IOFFP Flag indicating that grid boxes whose vertices have the value SPVAL are to be ignored during contouring.
  • SPVAL Special value denoting which grid boxes are to be ignored during contouring.
Purpose: CONREC draws contour plots of a two-dimensional array of regularly spaced data. Code Example

Syntax: CALL CONREC (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, NVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONREC assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT,JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. If NVAL = 0, the individual contour values are automatically computed.
  • NVAL Number of contour intervals. If NVAL = 0, the number of contour intervals and the contour interval values are automatically calculated. This is helpful if the range of data values is not known beforehand. NVAL must be less than or equal to 100.

Special features of CONREC:

  • If NVAL < 0, only high and lows are plotted instead of contours.
  • Common block CONPAR is used to control various characteristics of the contour plot from the calling program. The variables in CONPAR are shown below, along with their default values:
  • COMMON/CONPAR/ ISPEC, IOFFP, SPVAL, ILEGG, ILABB, NHII, NDECCN, NLBLL, LSCAL, LDASH, HGTLAB
  • ISPEC If 0, variables in CONPAR have no effect. Default = 0.
  • IOFFP If 1, you can specify regions not to contour by using SPVAL. Grid boxes with any corner values equal to SPVAL are not contoured. Default = 0.
  • SPVAL Special value to denote areas not to contour (usually set to 999.). Default = 0.
  • ILEGG If 0, legend below contour plot showing contour values, scale factors, etc. will not be printed. Default = 1.
  • ILABB If 0, contour labels are not plotted. Default = 1.
  • NHII If 0, H and L mark relative highs and lows, with the data value plotted underneath the symbol.
  • If > 0, values are plotted at each array point.
  • If < 0, neither of the above is done.
  • Default = 0.
  • NDECCN Number of digits to the right of the decimal point in the contour labels. Default = 1.
  • NLBLL Number of unlabeled contours between labeled contours. Default = 3.
  • LSCAL If LSCAL = 0, the contours are scaled such that 0 < labeled values < 100. If LSCAL = 1, the contours are not scaled, i.e. the contour values are the actual data values. Default = 0.
  • LDASH Specifies whether contours are solid (LDASH = 0) or dashed (LDASH NE 0). If LDASH is not equal to 0, then LDASH specifies the type of dash line to use to draw the contours. The numeric value of LDASH is the number of times the dashed pattern (solid line/blank space) is repeated per inch. Default= 0.
  • HGTLAB Specifies the height of contour labels. If HGTLAB=0, the height of the contours is .11 inches.
Purpose: CURVE draws a curve between two points, given the beginning and ending curve slopes. Code Example

Syntax: CALL CURVE (X1, Y1, X2, Y2, X3, Y3, X4, Y4, CONTIN)

Arguments:

  • X1, Y1 X, Y coordinates of the beginning of the curve.
  • X2, Y2 X, Y coordinates specifying the beginning curve slope. The initial slope of the curve is given by (Y2-Y1)/(X2-X1).
  • X3, Y3 X, Y coordinates specifying the ending curve slope. The end slope of the curve is given by (Y4-Y3)/(X4-X3).
  • X4, Y4 X, Y coordinates of the endpoint of the curve.
  • CONTIN Logical value. If CONTIN=.false. then the curve drawn starts a new path; otherwise, the curve is appended to the current path.

Note: The curve produced by CURVE is not automatically stroked.

Purpose: DRWCRV draws a solid curve. Code Example

Syntax: CALL DRWCRV (XARR, YARR, NPTS, THK, CLOSER)

Arguments:

  • XARR Array containing the x-coordinates of the points to be connected.
  • YARR Array containing the y-coordinates of the points to be connected.
  • NPTS Number of points in the curve.
  • THK Thickness of the curve. If THK = 0., the current line width is used.
  • CLOSER Logical variable. If CLOSER = .TRUE., the last point in the data arrays is connected to the first point, i.e. the curve is closed; otherwise, the curve is open.
Purpose: DRWTRI draws an equilateral triangle. Code Example

Syntax: CALL DRWTRI (XC, YC, SIDE, THK)

Arguments:

  • XC, YC X, Y coordinates of triangle center.
  • SIDE Length of triangle side.
  • THK Thickness of line used to draw the triangle. If THK = 0., the current line width is used.
Purpose: DSHCRV connects points in two data arrays using a line with a specified dash pattern. Code Example

Syntax: CALL DSHCRV (XARR, YARR, NPTS, IDSHPN, THK)

Arguments:

  • XARR Array containing the x-coordinates of the points to be connected.
  • YARR Array containing the y-coordinates of the points to be connected.
  • NPTS Number of points in the curve.
  • IDSHPN Dashed pattern of the line used to connect the data points. IDSHPN is specified as the number of times the dashed pattern (solid line/blank space) is repeated per inch.
  • THK Thickness of the dashes in the curve. If THK = 0., the current line width is used.
Purpose: DSHLIN connects two points using a line with a specified dash pattern. Code Example

Syntax: CALL DSHLIN (X1, Y1, X2, Y2, IDSHPN, THK)

Arguments:

  • X1, Y1 X, Y coordinates of first data point.
  • X2, Y2 X, Y coordinates of second data point.
  • IDSHPN Dashed pattern of the line used to connect the two data points. IDSHPN is specified as the number of times the dashed pattern (solid line/blank space) is repeated per inch.
  • THK Thickness of the dashes in the connecting line. If THK = 0., the current line width is used.
Purpose: FACTOR enlarges or reduces the size of a plot by a specified ratio.

Syntax: CALL FACTOR (FACT)

Arguments:

  • FACT The ratio of the desired plot size to the actual size. FACT must be a positive floating point number.
  • For example, to enlarge a plot to twice its normal size: CALL FACTOR (2.0)
Purpose: FAROHED draws a "fancy" arrowhead at a specified location. Code Example

Syntax: CALL FAROHED (XPP, YPP, DIR, AROLNP, SPRANG, LOCXY, FILL)

Arguments:

  • XPP, YPP X, Y coordinates of the tip of the arrowhead.
  • DIR Direction of arrowhead, measured east from north.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.
  • FILL Logical variable. If FILL= .TRUE., the arrowhead is filled; otherwise it is outlined.
Purpose: FILLBOX fills a shape with a specified gray level. Code Example

Syntax: CALL FILLBOX (XARR, YARR, NPTS, GRY)

Arguments:

  • XARR Array containing the x-coordinates of the points forming the perimeter of the shape to fill.
  • YARR Array containing the y-coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.
  • GRY Gray level of filled shape. GRY must lie between 0. (black) and 1. (white), inclusive.

Note: The current gray level remains at value GRY after exiting FILLBOX.

Purpose: FILRGN is the same as FILLBOX, except it restores the current gray level after filling. Code Example

Syntax: CALL FILRGN (XARR, YARR, NPTS, GRY)

Arguments:

  • XARR Array containing the X coordinates of the points forming the perimeter of the shape to fill.
  • YARR Array containing the Y coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.
  • GRY Gray level of filled shape. GRY must lie between 0. (black) and 1. (white), inclusive.
Purpose: FILRGNC fills a region with the current gray level or color.

Syntax: CALL FILRGNC (XARR, YARR, NPTS)

Arguments:

  • XARR Array containing the X coordinates of the points forming the perimeter of the shape shape to fill.
  • YARR Array containing the Y coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.
Purpose: GREST calls the PostScript operator grestore. It is useful after establishing and using a clipping region when it is no longer needed.

Syntax: CALL GREST

Arguments: None.

GREST is used to restore the graphics state of a PostScript page. It is called after a clipping region has been established and is no longer needed. GREST is used in conjunction with GSAV.

Purpose: GRKSYM plots a Greek symbol. Code Example

Syntax: CALL GRKSYM (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character is to be plotted.
  • NCHAR Number of characters to be plotted (should be set to 1).
  • MJUS Controls the justification of the character to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted character.
Purpose: GSAV calls the PostScript operator gsave. It is useful before establishing and using a clipping region.

Syntax: CALL GSAV

Arguments: None.

GSAV is used to save the graphics state of the PostScript page prior to defining a clipping region. After the clipping region is used, GREST is called to restore the original graphics state.

Purpose: HILITEC prints text surrounded by a rectangular box (color).

Syntax: CALL HILITEC (XPP, YPP, HEIGHT, CSTR, ANG, EDG, JUSX, JUSY, FRED, FGREEN, FBLUE, BRED, BGREEN, BBLUE)

Arguments:

  • XPP, YPP, X, Y coordinates of the box surrounding the text.
  • HEIGHT Height of text to be plotted.
  • CSTR Character string text to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the text is to be plotted.
  • EDG Fraction of the text height to use as an edge border.
  • JUSX Justification in the x-direction.
  • JUSX = 0 is left justification.
  • JUSX = 1 is centered.
  • JUSX = 2 is right justification.
  • JUSY Similar to JUSX, but in the y-direction.
  • JUSY = 0 is bottom justification.
  • JUSY = 1 is centered.
  • JUSY = 2 is top justification.
  • FRED, FGREEN, FBLUE Foreground text RGB values. Must lie between 0. and 1.0, inclusive.
  • BRED, BGREEN, BBLUE Background box RGB values. Must lie between 0. and 1.0, inclusive.
  • See code example for HILITEG.
Purpose: HILITEG prints text surrounded by a rectangular box (grayscale). Code Example

Syntax: CALL HILITEG (XPP, YPP, HEIGHT, CSTR, ANG, EDG, JUSX, JUSY, FGRY, BGRY)

Arguments:

  • XPP, YPP, X, Y coordinates of the box surrounding the text.
  • HEIGHT Height of text to be plotted.
  • CSTR Character string text to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the text is to be plotted.
  • EDG Fraction of the text height to use as an edge border.
  • JUSX Justification in the x-direction.
  • JUSX = 0 is left justification.
  • JUSX = 1 is centered.
  • JUSX = 2 is right justification.
  • JUSY Similar to JUSX, but in the y-direction.
  • JUSY = 0 is bottom justification.
  • JUSY = 1 is centered.
  • JUSY = 2 is top justification.
  • FGRY Gray level of the (foreground) text. FGRY must lie between 0. and 1.0, inclusive.
  • BGRY Gray level of the (background) surrounding box. BGRY must lie between 0. and 1.0, inclusive.
Purpose: INTEGRAL plots an integral with upper and lower limits. Code Example

Syntax: CALL INTEGRAL (XPP, YPP, HEIGHT, ANG, LOWER, NL, LUPPER, NU)

Arguments:

  • XPP, YPP, X, Y coordinates of the lower left edge of the integral.
  • HEIGHT Height of the integral.
  • ANG Angle, measured counterclockwise from the X-axis, at which the integral is plotted.
  • LOWER Character string of the lower limit (Hollerith).
  • NL Number of characters in the lower limit text.
  • LUPPER Character string of the upper limit (Hollerith).
  • NU Number of characters in the upper limit text.
Purpose: KEKEXP plots a floating point number in exponential format. Code Example

Syntax: CALL KEKEXP (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the number to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation
  • HEIGHT Height of number to be plotted.
  • FNUM Floating point number to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the number is to be plotted.
  • NDEC Controls the plotted precision of FNUM.
  • If NDEC > 0, it specifies the number of digits to the right of the decimal point, after rounding.
  • If NDEC = 0, only the number's integer portion and a decimal point are plotted, after rounding.
  • If NDEC = -1, only the number's integer portion is plotted, after rounding.
  • MJUS Controls the justification of the number to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted number.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted number.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted number.
Purpose: KEKFLT is the same as KEKNUM.

Syntax: CALL KEKFLT (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments: Same as KEKNUM.

Purpose: KEKNUM plots a floating point number in floating point format. Code Example

Syntax: CALL KEKNUM (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments:

  • XPP, YPP X, Y coordinates of the number to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of number to be plotted.
  • FNUM Floating point number to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the number is to be plotted.
  • NDEC Controls the plotted precision of FNUM.
  • If NDEC > 0, it specifies the number of digits to the right of the decimal point, after rounding.
  • If NDEC = 0, only the number's integer portion and a decimal point are plotted, after rounding.
  • If NDEC = -1, only the number's integer portion is plotted, after rounding.
  • MJUS Controls the justification of the number to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted number.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted number.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted number.
Purpose: KEKSYM plots a character string. Code Example

Syntax: CALL KEKSYM (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYM:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and IBCD equal to the octal code of the character you want to plot.

Purpose: KEKSYMC plots a character string. Same as KEKSYM, but text is input as a character string rather than Hollerith.

Syntax: CALL KEKSYMC (XPP, YPP, HEIGHT, CSTR, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • CSTR Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYMC:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and CSTR equal to the octal code of the character you want to plot. CSTR must be in single quotes.

Purpose: KEKSYMO plots a character string; however, the characters are outlined rather than filled (solid). Code Example

Syntax: CALL KEKSYMO (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYMO:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and IBCD equal to the octal code of the character you want to plot.

Purpose: LENSTR is a function whose returned value is the number of characters in the character string argument after trailing blanks have been removed.

Syntax: LS = LENSTR(STRING, NDIM)

Arguments:

  • STRING Character string variable.
  • NDIM Maximum length of STRING as stated in calling program.
  • LS Returned length of the character string STRING after trailing blanks have been removed.
Purpose: NEWDEV specifies a non-default filename which will contain the application program's output PostScript plot file.

Syntax: CALL NEWDEV (FLNAME, NCHAR)

Arguments:

  • FLNAME Character string or FORTRAN character variable which contains the name of the output Postscript file.
  • NCHAR Number of characters in the filename.
  • For example, CALL NEWDEV ('MYPLOT.DAT', 10)
    • NEWDEV is called only once per plotting session and must be called prior to PSINIT. If NEWDEV is not called, the name of the output PostScript file is psplot.ps.
Purpose: NUMBER is the same as KEKNUM with left justification.

Syntax: CALL NUMBER (XPP, YPP, HEIGHT, FNUM, ANG, NDEC)

Arguments: Same as KEKNUM.

Purpose: ONEHLF plots the symbol.

Syntax: CALL ONEHLF (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP X, Y coordinates of the symbol to be plotted.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
Purpose: OVERBAR plots a character string with an overbar. Code Example

Syntax: CALL OVERBAR (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of number to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
Purpose: OVERSBSP plots a subscripted and superscripted character string with an overbar. The overbar extends to cover both the subscripts and superscripts.

Syntax: CALL OVERSBSP (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS, ISUB, NSUB, ISUP, NSUP)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.
Purpose: OVERSBSPG plots a subscripted and superscripted Greek symbol with an overbar. The overbar extends to cover both the subscripts and superscripts. Code Example

Syntax: CALL OVERSBSPG (XPP, YPP, HEIGHT, ICH, ANG, CHAR, MJUS, ISUB, NSUB, ISUP, NSUP)

Arguments:

  • XPP, YPP X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.
Purpose: OVERSUB plots a subscripted character string with an overbar. The overbar extends to cover the subscripts. Code Example

Syntax: CALL OVERSUB (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS, ISUB, NSUB)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
Purpose: OVERSUBG plots a subscripted Greek symbol with an overbar. The overbar extends to cover the subscript. Code Example

Syntax: CALL OVERSUBG(XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUB, NSUB)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of the Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
Purpose: OVERSUP plots a superscripted character string with an overbar. The overbar extends to cover the subscript. Code Example

Syntax: CALL OVERSUP (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUP, NSUP)

Arguments:

  • XPP, YPP X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.
Purpose: OVERSUPG plots a subscripted Greek character with an overbar. The overbar extends to cover the superscript. Code Example

Syntax: CALL OVERSUPG (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUP, NSUP)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of the Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.
Purpose: OVRGRK plots a Greek symbol with an overbar. Code Example

Syntax: CALL OVRGRK (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the symbol to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.
Purpose: PLOT is the most fundamental user-level plotting command. It gives you direct control of pen movement (to any X, Y coordinate position) and pen status (up or down). Additionally, it allows you to re-define the current plotting origin. Code Example

Syntax: CALL PLOT (XPP, YPP, IPEN)

Arguments:

  • XPP, YPP, X, Y coordinates of the position to which the pen is to be moved. An origin may be established anywhere on or off the plotting surface, as explained below for negative IPEN values.
  • IPEN A signed integer which controls pen status (up/down) and origin definition.
  • If IPEN = 2, the pen is down during movement, thus drawing a visible line.
  • If IPEN = 3, the pen is up during movement, thus changing the pen's current position only.
  • If IPEN = -2 or -3, a new origin is defined at the position (XPP, YPP) after the movement is completed as if IPEN were positive. The logical X,Y coordinates of the new pen position are set to (0,0), so that all subsequent pen movements use this position as a reference point.
  • If IPEN = 999, the call to PLOT closes the output file. Thus, a call to PLOT with IPEN = 999 may be used only once in a given plotting session, and if used, must be the last plotting command in the plotting session. Calling PLOT with IPEN = 999 is identical to calling PLOTND (which see).
Purpose: PLOTND closes the output PostScript plot file to terminate the current plot defined by the user application program.

Syntax: CALL PLOTND

Arguments: None.

You must call PLOTND (or PLOT ( 0., 0., 999) ) as the last plotting call in the application program.

Purpose: PLSMIN plots the symbol. Code Example

Syntax: CALL PLSMIN (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character.
Purpose: PRIME plots the symbol '. Code Example

Syntax: CALL PRIME (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the symbol to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character.
Purpose: PSINIT is called to begin a plotting session. It must be called before any other plotting command, with the exception of NEWDEV.

Syntax: CALL PSINIT (PRTRT)

Arguments:

PRTRT Logical variable indicating the paper orientation. If PRTRT=.TRUE., the paper is oriented in portrait mode, i.e. long side of page is vertical. If PRTRT=.false., the paper is oriented in landscape mode, i.e. long side of page is horizontal.

Purpose: RECT draws a rectangle (or square). Code Example

Syntax: CALL RECT (XX1, YY1, XX2, YY2, HEIGHT)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.
Purpose: RECTFILC draws a rectangle (or square) and fills it with a specified red, green, and blue color levels.

Syntax: CALL RECTFILC (XX1, YY1, XX2, YY2, HEIGHT, RED, GREEN BLUE)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.
  • RED, GREEN, BLUE RGB values of the fill color. Must lie between 0. and 1., inclusively.
Purpose: RECTFILG draws a rectangle (or square) and fills it with a specified gray level. Code Example

Syntax: CALL RECTFILG (XX1, YY1, XX2, YY2, HEIGHT, GRYLEV)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.
  • GRYLEV Gray level to use for filling rectangle. GRYLEV must lie between 0. (black) and 1. (white), inclusive.
Purpose: ROTATE rotates the current coordinate system by a specified angle. Essentially, ROTATE issues the PostScript rotate command.

Syntax: CALL ROTATE ( ANG )

Arguments:

ANGLE Angle, measured counterclockwise, to rotate the current coordinate system.

Purpose: RRECT draws a rectangle (or square).with rounded corners. It can then fill the rectangle with the current gray level or RGB values. Code Example

Syntax: CALL RRECT (XX1, YY1, WIDTH, HEIGHT, RAD, ANG, FILL)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • WIDTH Width of rectangle.
  • HEIGHT Height of rectangle.
  • RAD Radius of rectangle corner curves.
  • ANG Angle of rectangle rotation.
  • FILL Logical value. If FILL=.true., then the rectangle is filled with the current gray level or RGB values; otherwise, the rectangle is outlined.
Purpose: SETCOLR sets the current red, green, and blue color levels.

Syntax: CALL SETCOLR (RED, GREEN, BLUE)

Arguments:

  • RED Red color saturation level, between 0. and 1.0.
  • GREEN Green color saturation level, between 0. and 1.0.
  • BLUE Blue color saturation level, between 0. and 1.0.
Purpose: SETFNT sets the current font. Code Example

Syntax: CALL SETFNT (NFONT)

Arguments:

  • NFONT Number of desired font between 1 and 35 (see table below).
  • The fonts sets 29 (Symbol) and 35 (Zapf Dingbats) require the octal code of the character to be plotted. Click the appropriate table to see the character sets and corresponding octal code values for these two fonts. Symbol Zapf Dingbats
Purpose: SETGRY sets the current gray level. Code Example

Syntax: CALL SETGRY (GRYLVL)

Arguments:

GRYLVL Gray level between 0. (black) and 1. (white).

Purpose: SETLW sets the current line width. Code Example

Syntax: CALL SETLW (RLW)

Arguments:

  • RLW Line width.
  • After calling SETLW, RLW remains the current line width until SETLW is called again.
Purpose: SIGMA draws the symbol , with upper and lower limits. Code Example

Syntax: CALL SIGMA (XPP, YPP, HEIGHT, ANG, LOWER, NL, LUPPER, NU)

Arguments:

  • XPP, YPP X, Y coordinates of the lower left edge of the symbol.
  • HEIGHT Height of the symbol.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • LOWER Character string specifying the lower limit (Hollerith).
  • NL Number of characters in the lower limit character string.
  • LUPPER Character string specifying the upper limit (Hollerith).
  • NU Number of characters in the upper limit character string.
  • If NL (NU) is set to -999, then LOWER (LUPPER) is the octal code of the character in the font SYMBOL.
Purpose: SLDCRV connects points in two data arrays using a line with a specified thickness. Code Example

Syntax: CALL SLDCRV (XARR, YARR, NPTS, THK)

Arguments:

  • XARR Array containing the X coordinates of the data points to be plotted.
  • YARR Array containing the Y coordinates of the data points to be plotted.
  • NPTS Number of points in the curve.
  • THK Specifies the thickness of the curve. If THK = 0., the current line width is used.
Purpose: SLDLIN connects two points using a line with a specified thickness. Code Example

Syntax: CALL SLDLIN (X1, Y1, X2, Y2, THK)

Arguments:

  • X1, Y1 X, Y coordinates of first data point.
  • X2, Y2 X, Y coordinates of second data point.
  • THK Specifies the thickness of the connecting line. If THK=0., the current line width is used.
Purpose: SQRSGN draws a radical (square root) sign. Code Example

Syntax: CALL SQRSGN (XPP, YPP, HEIGHT, RLEN)

Arguments:

  • XPP, YPP, X, Y coordinates of lower left corner of the radical.
  • HEIGHT Height of the radical.
  • RLEN Length of the top of the radical.
Purpose: SQUARE draws a centered square. Code Example

Syntax: CALL SQUARE (XC, YC, SIDE)

Arguments:

  • XC, YC X, Y coordinates of the center of the square.
  • SIDE Length of the sides of the square.
Purpose: STROKE calls the PostScript operator stroke (which paints or draws the current path).

Syntax: CALL STROKE

Arguments: None.

Purpose: SUBBER draws a subscript. Code Example

Syntax: CALL SUBBER (ISUB, NSUB, SIZE, ANG)

Arguments:

  • ISUB Hollerith variable specifying the subscript character string.
  • NSUB Number of characters in the subscript.
  • SIZE Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBBER must be called immediately after the call to create the subscripted variable.

Purpose:SUBBERSP draws a subscript of "special" characters. Code Example

Syntax: CALL SUBBERSP (NSET, NFNT, ITITLE, NCHR, HEIGHT, ANG

Arguments:

  • NSET Number of different font sets needed.
  • NFNT Array holding the font numbers 1 to NSET.
  • ITITLE ITITLE holds the octal codes for characters of fonts 29 or 35; otherwise, it hold the text characters themselves.
  • NCHR Number of characters of a given font. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBBERSP must be called immediately after the call to create the subscripted variable.

Purpose: SUBSUP draws a subscript and superscript. Code Example

Syntax: CALL SUBSUP (ISUB, NSUB, ISUP, NSUP, SIZE, ANG)

Arguments:

  • ISUB Hollerith variable specifying the subscript character string.
  • NSUB Number of characters in the subscript.
  • ISUP Hollerith variable specifying the superscript character string.
  • NSUP Number of characters in the superscript.
  • SIZE Height of the variable to be subscripted and superscripted. It is not the height of the subscript and superscript characters themselves.
  • ANG Angle of the subscripted and superscripted variable.

Note: SUBSUP must be called immediately after the call to create the subscripted and superscripted variable.

Purpose: SUBSUPSP draws subscripts and superscripts of "special" characters. Code Example

Syntax: CALL SUBSUPSP (NSUB, NFNTSB, ITITLESB, NCHRSB, NSUP, NFNTSP, ITITLESP, NCHRSP, HEIGHT, ANG)

Arguments:

  • NSUB, NSUP Number of different font sets needed for subscripts and superscripts, respectively.
  • NFNTSB, NFNTSP Arrays holding the font numbers 1 to NSET for subscripts and superscripts, respectively.
  • ITITLESB, ITITLESP Arrays holding the octal codes for characters of fonts 29 or 35; otherwise, holding text characters themselves.
  • NCHRSB, NCHRSP Number of characters of a given font for subscripts and superscripts, respectively. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBSUPSP must be called immediately after the call to create the subscripted variable.

Purpose: SUPER draws a superscript. Code Example

Syntax: CALL SUPER (ISUP, NSUP, SIZE, ANG)

Arguments:

  • ISUP Hollerith variable specifying the superscript character string.
  • NSUP Number of characters in the superscript.
  • SIZE Height of the variable to be superscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the superscripted variable.

Note: SUPER must be called immediately after the call to create the superscripted variable.

Purpose: SUPERSP draws a superscript of "special" characters. Code Example

Syntax: CALL SUPERSP (NSET, NFNT, ITITLE, NCHR, HEIGHT, ANG)

Arguments:

  • NSET Number of different font sets needed.
  • NFNT Array holding the font numbers 1 to NSET.
  • ITITLE ITITLE holds the octal codes for characters of fonts 29 or 35; otherwise, it hold the text characters themselves.
  • NCHR Number of characters of a given font. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be superscripted. It is not the height of the superscript characters themselves.
  • ANG Angle of the superscripted variable.

Note: SUPERSP must be called immediately after the call to create the superscripted variable.

Purpose: SYMBOL plots a character string. It is similar to subroutine KEKSYM, except that justification and continuation are not supported. Code Example

Syntax: CALL SYMBOL (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR)

Arguments:

  • XPP, YPP, X, Y coordinates of the lower left corner of the first character of the string to be plotted.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string.

This section describes the user-level subroutines in the PSPLOT plotting library. These routines are Fortran-callable from an application program. Below is a brief summary of the subroutines, followed by an alphabetical listing of each subroutine containing a more detailed description of its function, syntax, and calling arguments.

Note that the code examples here are shown in black and white and grayscale, as that is how they are produced in the hardcopy User's Manual. PSPLOT fully supports color graphics.

Subroutines A-F

ARC

Purpose: ARC draws an arc having a specified radius and arc center. Code Example

Syntax: CALL ARC (XC, YC, RAD, ANG1, ANG2)

Arguments:

  • XC, YC X, Y coordinates of the center of the arc.
  • RAD Radius of arc.
  • ANG1 Angle of arc beginning.
  • ANG2 Angle of arc ending.

AROHED

Purpose: AROHED draws an arrowhead at a specified location. Code Example

Syntax: CALL AROHED (XPP, YPP, DIR, AROLNP, SPRANG, LOCXY)

Arguments:

  • XPP, YPP, X, Y coordinates of the tip of the arrowhead.
  • DIR Direction of arrowhead, measured east from north.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.

ARROW

Purpose: ARROW draws an arrow, with vector length, at a specified location. Code Example

Syntax: CALL ARROW (XSS, YSS, XPP, YPP, AROLNP, SPRANG, LOCXY )

Arguments:

  • XSS, YSS X, Y coordinates of the vector length origin.
  • XPP, YPP X, Y coordinates of the tip of the arrowhead.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.

AXIS

Purpose: AXIS draws an axis of a graph, with user-specified axis titles. Tick marks are drawn with a spacing of one inch. Code Example

Syntax: CALL AXIS (XPP, YPP, IBCD, NC, AXLEN, THETA, RMIN, DEL)

Arguments:

  • XPP, YPP X, Y coordinates of axis origin.
  • IBCD Axis title (Hollerith).
  • NC Number of characters in title. Its sign is used to specify on which side of the axis the title is to appear: positive for the counterclockwise side of the axis, negative for the clockwise side. Positive labeling is generally used for Y axes, negative for X axes.
  • AXLEN Length of axis.
  • THETA Angle of axis. Generally, 0 for X axes, 90 for Y axes.
  • RMIN The starting value and annotation of the first tick mark.
  • DEL The data value increment between tick marks.

BLKSTP

Purpose: BLKSTP strips out embedded blanks in a character string. It returns the new character string and the number of characters in the new string.

Syntax: CALL BLKSTP (STR1, NDIM, STR2, NC)

Arguments:

  • STR1 Input character string.
  • NDIM Maximum length of STR1 as stated in calling program.
  • STR2 Output character string with embedded blanks removed.
  • NC Number of characters in STR2.

BORDER

Purpose: BORDER draws a rectangular border with tick marks. The lower left corner of the border is located at the current plot origin. Code Example

Syntax: CALL BORDER (XLEN, YLEN, ITIC, IBRD, MAJX, MINX, MAJY, MINY)

Arguments:

  • XLEN Length of x-direction side of border.
  • YLEN Length of y-direction side of border.
  • ITIC Four digit number which determines which of the border sides will contain tick marks. Each of the digits is either 0 or 1, and if set to 1, that side will contain tick marks. The border sides are ordered as follows:
  • Left-vertical Bottom Right-vertical Top
  • For example, if ITIC = 1011, all sides except the bottom would contain tick marks. Additionally, if ITIC < 0, the tick marks will be drawn on the outside of the border than on the inside (default).
  • IBRD IBRD is similar to ITIC except that it determines which sides of the border will be drawn. Hence, you can have tick marks with no border, and vice versa.
  • MAJX Number of major divisions in the x-direction. A longer tick mark is drawn for these divisions.
  • MINX Number of minor divisions in the x-direction, i.e. the number of divisions per major division. A shorter tick mark is drawn for these divisions.
  • MAJY Same as MAJX in y-direction.
  • MINY Same as MINX in y-direction.

CHOPIT

Purpose: CHOPIT logically closes the current graphics page and begins a new one.

Syntax: CALL CHOPIT (XPP, YPP)

Arguments:

  • XPP, YPP, X, Y coordinates of the initial plot origin of the next plot. This allows you to begin all plots at the same origin on each page.

Note: XPP and YPP are coordinates independent of the current scaling factor. That is, XPP and YPP represent actual inches, not scaled coordinates. The current scaling factor is reinstated after the new coordinate origin is set.

Subroutine CHOPIT should not be confused with subroutine PLOTND, which is called once at the end of each plotting session and which closes the entire output PostScript file.

CIRCLE

Purpose: CIRCLE draws a circle. Code Example

Syntax: CALL CIRCLE (XC, YC, RAD, FILL)

Arguments:

  • XC, YC X, Y coordinates of the center of the circle.
  • RAD Radius of the circle.
  • FILL Logical value. If FILL=.TRUE., circle is filled with the current color or gray scale; otherwise it is outlined.

CLIP

Purpose: CLIP inserts the PostScript command clip into the output file.

Syntax: CALL CLIP

Arguments: None.

Note: Most uses of this command are bracketed by calls to GSAV and GREST.

CLIPBOX

Purpose: CLIPBOX defines a clipping region. Code Example

Syntax: CALL CLIPBOX (XPTS, YPTS, NPTS)

Arguments:

  • XPTS Array containing x-coordinates of region path.
  • YPTS Array containing y-coordinates of region path.
  • NPTS Number of points in region path.

COLBOX

Purpose: COLBOX fills a region with a specified color.

Syntax: CALL COLBOX (XPTS, YPTS, NPTS, RED, GREEN, BLUE)

Arguments:

  • XPTS Array containing x-coordinates of region path.
  • YPTS Array containing y-coordinates of region path.
  • NPTS Number of points in region path.
  • RED Red value of specified color in RGB color model.
  • GREEN Green value of specified color in RGB color model.
  • BLUE Blue value of specified color in RGB color model.
  • ARGUMENTS RED, GREEN, and BLUE must lie between 0. and 1.0, inclusive.

CONCOLR

Purpose: CONCOLR draws color contour plots of a two-dimensional array of regularly spaced data.

Syntax: CALL CONCOLR (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, COLOR, NVAL, IOFFP, SPVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONCOLR assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT,JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. Unlike in subroutine CONREC, NVAL cannot equal 0.
  • COLOR Array dimensioned (3,NVAL) containing the red, green, and blue values for each of the contour levels. The red value is stored in (1,n), the green value in (2,n) and the blue value in (3,n), where n specifies the contour index corresponding to CVAL. Regions less than or equal to the corresponding contour value CVAL are filled with the corresponding RBG values.
  • NVAL Number of contour intervals. NVAL must be less than or equal to 100, and unlike in CONREC, NVAL cannot equal 0.
  • IOFFP Flag indicating that grid boxes whose vertices have the value SPVAL are to be ignored during contouring.
  • SPVAL Special value denoting which grid boxes are to be ignored during contouring.
  • See coding example for CONFILL.

CONFILL

Purpose: CONFILL draws grayscale contour plots of a two-dimensional array of regularly spaced data. Code Example

Syntax: CALL CONFILL (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, GRYLEV, NVAL, IOFFP, SPVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONFILL assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT, JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. Unlike subroutine CONREC, NVAL cannot equal 0.
  • GRYLEV Array dimensioned (NVAL) containing the grayscale values for each of the contour levels. Regions less than or equal to the corresponding contour value CVAL are filled with the corresponding grayscale values. Grayscale values range from 0. (black) to 1.0 (white).
  • NVAL Number of contour intervals. NVAL must be less than or equal to 100, and unlike in CONREC, NVAL cannot equal 0.
  • IOFFP Flag indicating that grid boxes whose vertices have the value SPVAL are to be ignored during contouring.
  • SPVAL Special value denoting which grid boxes are to be ignored during contouring.

CONREC

Purpose: CONREC draws contour plots of a two-dimensional array of regularly spaced data. Code Example

Syntax: CALL CONREC (ARR, IMAX, IEXT, JEXT, XLEN, YLEN, CVAL, NVAL)

Arguments:

  • ARR Two-dimensional array containing regularly spaced data to be contoured. CONREC assumes ARR(1,1) is located at the lower left corner of the plot. Data points ARR(1,1) through ARR(IEXT,JEXT) are contoured in an area XLEN x YLEN.
  • IMAX The first dimension of ARR in the calling program.
  • IEXT Number of points in x-direction of ARR to be contoured.
  • JEXT Number of points in y-direction of ARR to be contoured.
  • XLEN X-direction length of plotting area.
  • YLEN Y-direction length of plotting area.
  • CVAL Array containing the values to be used for contour intervals (1 to NVAL). CVAL must be dimensioned with a dimension of at least 1. If NVAL = 0, the individual contour values are automatically computed.
  • NVAL Number of contour intervals. If NVAL = 0, the number of contour intervals and the contour interval values are automatically calculated. This is helpful if the range of data values is not known beforehand. NVAL must be less than or equal to 100.

Special features of CONREC:

  • If NVAL < 0, only high and lows are plotted instead of contours.
  • Common block CONPAR is used to control various characteristics of the contour plot from the calling program. The variables in CONPAR are shown below, along with their default values:
  • COMMON/CONPAR/ ISPEC, IOFFP, SPVAL, ILEGG, ILABB, NHII, NDECCN, NLBLL, LSCAL, LDASH, HGTLAB
  • ISPEC If 0, variables in CONPAR have no effect. Default = 0.
  • IOFFP If 1, you can specify regions not to contour by using SPVAL. Grid boxes with any corner values equal to SPVAL are not contoured. Default = 0.
  • SPVAL Special value to denote areas not to contour (usually set to 999.). Default = 0.
  • ILEGG If 0, legend below contour plot showing contour values, scale factors, etc. will not be printed. Default = 1.
  • ILABB If 0, contour labels are not plotted. Default = 1.
  • NHII If 0, H and L mark relative highs and lows, with the data value plotted underneath the symbol.
  • If > 0, values are plotted at each array point.
  • If < 0, neither of the above is done.
  • Default = 0.
  • NDECCN Number of digits to the right of the decimal point in the contour labels. Default = 1.
  • NLBLL Number of unlabeled contours between labeled contours. Default = 3.
  • LSCAL If LSCAL = 0, the contours are scaled such that 0 < labeled values < 100. If LSCAL = 1, the contours are not scaled, i.e. the contour values are the actual data values. Default = 0.
  • LDASH Specifies whether contours are solid (LDASH = 0) or dashed (LDASH NE 0). If LDASH is not equal to 0, then LDASH specifies the type of dash line to use to draw the contours. The numeric value of LDASH is the number of times the dashed pattern (solid line/blank space) is repeated per inch. Default= 0.
  • HGTLAB Specifies the height of contour labels. If HGTLAB=0, the height of the contours is .11 inches.

CURVE

Purpose: CURVE draws a curve between two points, given the beginning and ending curve slopes. Code Example

Syntax: CALL CURVE (X1, Y1, X2, Y2, X3, Y3, X4, Y4, CONTIN)

Arguments:

  • X1, Y1 X, Y coordinates of the beginning of the curve.
  • X2, Y2 X, Y coordinates specifying the beginning curve slope. The initial slope of the curve is given by (Y2-Y1)/(X2-X1).
  • X3, Y3 X, Y coordinates specifying the ending curve slope. The end slope of the curve is given by (Y4-Y3)/(X4-X3).
  • X4, Y4 X, Y coordinates of the endpoint of the curve.
  • CONTIN Logical value. If CONTIN=.false. then the curve drawn starts a new path; otherwise, the curve is appended to the current path.

Note: The curve produced by CURVE is not automatically stroked.

DRWCRV

Purpose: DRWCRV draws a solid curve. Code Example

Syntax: CALL DRWCRV (XARR, YARR, NPTS, THK, CLOSER)

Arguments:

  • XARR Array containing the x-coordinates of the points to be connected.
  • YARR Array containing the y-coordinates of the points to be connected.
  • NPTS Number of points in the curve.
  • THK Thickness of the curve. If THK = 0., the current line width is used.
  • CLOSER Logical variable. If CLOSER = .TRUE., the last point in the data arrays is connected to the first point, i.e. the curve is closed; otherwise, the curve is open.

DRWTRI

Purpose: DRWTRI draws an equilateral triangle. Code Example

Syntax: CALL DRWTRI (XC, YC, SIDE, THK)

Arguments:

  • XC, YC X, Y coordinates of triangle center.
  • SIDE Length of triangle side.
  • THK Thickness of line used to draw the triangle. If THK = 0., the current line width is used.

DSHCRV

Purpose: DSHCRV connects points in two data arrays using a line with a specified dash pattern. Code Example

Syntax: CALL DSHCRV (XARR, YARR, NPTS, IDSHPN, THK)

Arguments:

  • XARR Array containing the x-coordinates of the points to be connected.
  • YARR Array containing the y-coordinates of the points to be connected.
  • NPTS Number of points in the curve.
  • IDSHPN Dashed pattern of the line used to connect the data points. IDSHPN is specified as the number of times the dashed pattern (solid line/blank space) is repeated per inch.
  • THK Thickness of the dashes in the curve. If THK = 0., the current line width is used.

DSHLIN

Purpose: DSHLIN connects two points using a line with a specified dash pattern. Code Example

Syntax: CALL DSHLIN (X1, Y1, X2, Y2, IDSHPN, THK)

Arguments:

  • X1, Y1 X, Y coordinates of first data point.
  • X2, Y2 X, Y coordinates of second data point.
  • IDSHPN Dashed pattern of the line used to connect the two data points. IDSHPN is specified as the number of times the dashed pattern (solid line/blank space) is repeated per inch.
  • THK Thickness of the dashes in the connecting line. If THK = 0., the current line width is used.

FACTOR

Purpose: FACTOR enlarges or reduces the size of a plot by a specified ratio.

Syntax: CALL FACTOR (FACT)

Arguments:

  • FACT The ratio of the desired plot size to the actual size. FACT must be a positive floating point number.
  • For example, to enlarge a plot to twice its normal size: CALL FACTOR (2.0)

FAROHED

Purpose: FAROHED draws a "fancy" arrowhead at a specified location. Code Example

Syntax: CALL FAROHED (XPP, YPP, DIR, AROLNP, SPRANG, LOCXY, FILL)

Arguments:

  • XPP, YPP X, Y coordinates of the tip of the arrowhead.
  • DIR Direction of arrowhead, measured east from north.
  • AROLNP Length of arrowhead sides.
  • SPRANG Half the angular spread of arrowhead.
  • LOCXY Location of arrowhead point
  • LOCXY=1 XPP, YPP at arrowhead point (most commonly used)
  • LOCXY=2 XPP, YPP at center of arrowhead.
  • LOCXY=3 XPP, YPP at tail of arrowhead.
  • FILL Logical variable. If FILL= .TRUE., the arrowhead is filled; otherwise it is outlined.

FILLBOX

Purpose: FILLBOX fills a shape with a specified gray level. Code Example

Syntax: CALL FILLBOX (XARR, YARR, NPTS, GRY)

Arguments:

  • XARR Array containing the x-coordinates of the points forming the perimeter of the shape to fill.
  • YARR Array containing the y-coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.
  • GRY Gray level of filled shape. GRY must lie between 0. (black) and 1. (white), inclusive.

Note: The current gray level remains at value GRY after exiting FILLBOX.

FILRGN

Purpose: FILRGN is the same as FILLBOX, except it restores the current gray level after filling. Code Example

Syntax: CALL FILRGN (XARR, YARR, NPTS, GRY)

Arguments:

  • XARR Array containing the X coordinates of the points forming the perimeter of the shape to fill.
  • YARR Array containing the Y coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.
  • GRY Gray level of filled shape. GRY must lie between 0. (black) and 1. (white), inclusive.

FILRGNC

Purpose: FILRGNC fills a region with the current gray level or color.

Syntax: CALL FILRGNC (XARR, YARR, NPTS)

Arguments:

  • XARR Array containing the X coordinates of the points forming the perimeter of the shape shape to fill.
  • YARR Array containing the Y coordinates of the points forming the perimeter of the shape to fill.
  • NPTS Number of points comprising the shape perimeter.

Subroutines G-L

GREST

Purpose: GREST calls the PostScript operator grestore. It is useful after establishing and using a clipping region when it is no longer needed.

Syntax: CALL GREST

Arguments: None.

GREST is used to restore the graphics state of a PostScript page. It is called after a clipping region has been established and is no longer needed. GREST is used in conjunction with GSAV.

GRKSYM

Purpose: GRKSYM plots a Greek symbol. Code Example

Syntax: CALL GRKSYM (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character is to be plotted.
  • NCHAR Number of characters to be plotted (should be set to 1).
  • MJUS Controls the justification of the character to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted character.

GSAV

Purpose: GSAV calls the PostScript operator gsave. It is useful before establishing and using a clipping region.

Syntax: CALL GSAV

Arguments: None.

GSAV is used to save the graphics state of the PostScript page prior to defining a clipping region. After the clipping region is used, GREST is called to restore the original graphics state.

HILITEC

Purpose: HILITEC prints text surrounded by a rectangular box (color).

Syntax: CALL HILITEC (XPP, YPP, HEIGHT, CSTR, ANG, EDG, JUSX, JUSY, FRED, FGREEN, FBLUE, BRED, BGREEN, BBLUE)

Arguments:

  • XPP, YPP, X, Y coordinates of the box surrounding the text.
  • HEIGHT Height of text to be plotted.
  • CSTR Character string text to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the text is to be plotted.
  • EDG Fraction of the text height to use as an edge border.
  • JUSX Justification in the x-direction.
  • JUSX = 0 is left justification.
  • JUSX = 1 is centered.
  • JUSX = 2 is right justification.
  • JUSY Similar to JUSX, but in the y-direction.
  • JUSY = 0 is bottom justification.
  • JUSY = 1 is centered.
  • JUSY = 2 is top justification.
  • FRED, FGREEN, FBLUE Foreground text RGB values. Must lie between 0. and 1.0, inclusive.
  • BRED, BGREEN, BBLUE Background box RGB values. Must lie between 0. and 1.0, inclusive.
  • See code example for HILITEG.

HILITEG

Purpose: HILITEG prints text surrounded by a rectangular box (grayscale). Code Example

Syntax: CALL HILITEG (XPP, YPP, HEIGHT, CSTR, ANG, EDG, JUSX, JUSY, FGRY, BGRY)

Arguments:

  • XPP, YPP, X, Y coordinates of the box surrounding the text.
  • HEIGHT Height of text to be plotted.
  • CSTR Character string text to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the text is to be plotted.
  • EDG Fraction of the text height to use as an edge border.
  • JUSX Justification in the x-direction.
  • JUSX = 0 is left justification.
  • JUSX = 1 is centered.
  • JUSX = 2 is right justification.
  • JUSY Similar to JUSX, but in the y-direction.
  • JUSY = 0 is bottom justification.
  • JUSY = 1 is centered.
  • JUSY = 2 is top justification.
  • FGRY Gray level of the (foreground) text. FGRY must lie between 0. and 1.0, inclusive.
  • BGRY Gray level of the (background) surrounding box. BGRY must lie between 0. and 1.0, inclusive.

INTEGRAL

Purpose: INTEGRAL plots an integral with upper and lower limits. Code Example

Syntax: CALL INTEGRAL (XPP, YPP, HEIGHT, ANG, LOWER, NL, LUPPER, NU)

Arguments:

  • XPP, YPP, X, Y coordinates of the lower left edge of the integral.
  • HEIGHT Height of the integral.
  • ANG Angle, measured counterclockwise from the X-axis, at which the integral is plotted.
  • LOWER Character string of the lower limit (Hollerith).
  • NL Number of characters in the lower limit text.
  • LUPPER Character string of the upper limit (Hollerith).
  • NU Number of characters in the upper limit text.

KEKEXP

Purpose: KEKEXP plots a floating point number in exponential format. Code Example

Syntax: CALL KEKEXP (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the number to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation
  • HEIGHT Height of number to be plotted.
  • FNUM Floating point number to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the number is to be plotted.
  • NDEC Controls the plotted precision of FNUM.
  • If NDEC > 0, it specifies the number of digits to the right of the decimal point, after rounding.
  • If NDEC = 0, only the number's integer portion and a decimal point are plotted, after rounding.
  • If NDEC = -1, only the number's integer portion is plotted, after rounding.
  • MJUS Controls the justification of the number to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted number.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted number.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted number.

KEKFLT

Purpose: KEKFLT is the same as KEKNUM.

Syntax: CALL KEKFLT (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments: Same as KEKNUM.

KEKNUM

Purpose: KEKNUM plots a floating point number in floating point format. Code Example

Syntax: CALL KEKNUM (XPP, YPP, HEIGHT, FNUM, ANG, NDEC, MJUS)

Arguments:

  • XPP, YPP X, Y coordinates of the number to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of number to be plotted.
  • FNUM Floating point number to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the number is to be plotted.
  • NDEC Controls the plotted precision of FNUM.
  • If NDEC > 0, it specifies the number of digits to the right of the decimal point, after rounding.
  • If NDEC = 0, only the number's integer portion and a decimal point are plotted, after rounding.
  • If NDEC = -1, only the number's integer portion is plotted, after rounding.
  • MJUS Controls the justification of the number to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the plotted number.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the plotted number.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the plotted number.

KEKSYM

Purpose: KEKSYM plots a character string. Code Example

Syntax: CALL KEKSYM (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYM:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and IBCD equal to the octal code of the character you want to plot.

KEKSYMC

Purpose: KEKSYMC plots a character string. Same as KEKSYM, but text is input as a character string rather than Hollerith.

Syntax: CALL KEKSYMC (XPP, YPP, HEIGHT, CSTR, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • CSTR Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYMC:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and CSTR equal to the octal code of the character you want to plot. CSTR must be in single quotes.

KEKSYMO

Purpose: KEKSYMO plots a character string; however, the characters are outlined rather than filled (solid). Code Example

Syntax: CALL KEKSYMO (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

Special feature of KEKSYMO:

You can plot special characters, for example the characters in fonts Symbol and Zapf Dingbats, by setting NCHAR=-999 and IBCD equal to the octal code of the character you want to plot.

LENSTR

Purpose: LENSTR is a function whose returned value is the number of characters in the character string argument after trailing blanks have been removed.

Syntax: LS = LENSTR(STRING, NDIM)

Arguments:

  • STRING Character string variable.
  • NDIM Maximum length of STRING as stated in calling program.
  • LS Returned length of the character string STRING after trailing blanks have been removed.

Subroutines M-R

NEWDEV

Purpose: NEWDEV specifies a non-default filename which will contain the application program's output PostScript plot file.

Syntax: CALL NEWDEV (FLNAME, NCHAR)

Arguments:

  • FLNAME Character string or FORTRAN character variable which contains the name of the output Postscript file.
  • NCHAR Number of characters in the filename.
  • For example, CALL NEWDEV ('MYPLOT.DAT', 10)
    • NEWDEV is called only once per plotting session and must be called prior to PSINIT. If NEWDEV is not called, the name of the output PostScript file is psplot.ps.

NUMBER

Purpose: NUMBER is the same as KEKNUM with left justification.

Syntax: CALL NUMBER (XPP, YPP, HEIGHT, FNUM, ANG, NDEC)

Arguments: Same as KEKNUM.

ONEHLF

Purpose: ONEHLF plots the symbol.

Syntax: CALL ONEHLF (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP X, Y coordinates of the symbol to be plotted.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

OVERBAR

Purpose: OVERBAR plots a character string with an overbar. Code Example

Syntax: CALL OVERBAR (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of number to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.

OVERSBSP

Purpose: OVERSBSP plots a subscripted and superscripted character string with an overbar. The overbar extends to cover both the subscripts and superscripts.

Syntax: CALL OVERSBSP (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS, ISUB, NSUB, ISUP, NSUP)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.

OVERSBSPG

Purpose: OVERSBSPG plots a subscripted and superscripted Greek symbol with an overbar. The overbar extends to cover both the subscripts and superscripts. Code Example

Syntax: CALL OVERSBSPG (XPP, YPP, HEIGHT, ICH, ANG, CHAR, MJUS, ISUB, NSUB, ISUP, NSUP)

Arguments:

  • XPP, YPP X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.

OVERSUB

Purpose: OVERSUB plots a subscripted character string with an overbar. The overbar extends to cover the subscripts. Code Example

Syntax: CALL OVERSUB (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR, MJUS, ISUB, NSUB)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.

OVERSUBG

Purpose: OVERSUBG plots a subscripted Greek symbol with an overbar. The overbar extends to cover the subscript. Code Example

Syntax: CALL OVERSUBG(XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUB, NSUB)

Arguments:

  • XPP, YPP, X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of the Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.
  • ISUB Hollerith character(s) comprising the subscript.
  • NSUB Number of characters in the subscript string.

OVERSUP

Purpose: OVERSUP plots a superscripted character string with an overbar. The overbar extends to cover the subscript. Code Example

Syntax: CALL OVERSUP (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUP, NSUP)

Arguments:

  • XPP, YPP X, Y coordinates of the character string to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string to plot.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character string.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character string.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character string.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.

OVERSUPG

Purpose: OVERSUPG plots a subscripted Greek character with an overbar. The overbar extends to cover the superscript. Code Example

Syntax: CALL OVERSUPG (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS, ISUP, NSUP)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of the Greek symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.
  • ISUP Hollerith character(s) comprising the superscript.
  • NSUP Number of characters in the superscript string.

OVRGRK

Purpose: OVRGRK plots a Greek symbol with an overbar. Code Example

Syntax: CALL OVRGRK (XPP, YPP, HEIGHT, ICH, ANG, NCHAR, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the Greek symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ICH Integer value between 1 and 50 corresponding to the desired Greek symbol (see table below Subroutine GRKSYM).
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • NCHAR Number of characters in the string to plot (should be set to 1).
  • MJUS Controls the justification of the symbol to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the symbol.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the symbol.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the symbol.

PLOT

Purpose: PLOT is the most fundamental user-level plotting command. It gives you direct control of pen movement (to any X, Y coordinate position) and pen status (up or down). Additionally, it allows you to re-define the current plotting origin. Code Example

Syntax: CALL PLOT (XPP, YPP, IPEN)

Arguments:

  • XPP, YPP, X, Y coordinates of the position to which the pen is to be moved. An origin may be established anywhere on or off the plotting surface, as explained below for negative IPEN values.
  • IPEN A signed integer which controls pen status (up/down) and origin definition.
  • If IPEN = 2, the pen is down during movement, thus drawing a visible line.
  • If IPEN = 3, the pen is up during movement, thus changing the pen's current position only.
  • If IPEN = -2 or -3, a new origin is defined at the position (XPP, YPP) after the movement is completed as if IPEN were positive. The logical X,Y coordinates of the new pen position are set to (0,0), so that all subsequent pen movements use this position as a reference point.
  • If IPEN = 999, the call to PLOT closes the output file. Thus, a call to PLOT with IPEN = 999 may be used only once in a given plotting session, and if used, must be the last plotting command in the plotting session. Calling PLOT with IPEN = 999 is identical to calling PLOTND (which see).

PLOTND

Purpose: PLOTND closes the output PostScript plot file to terminate the current plot defined by the user application program.

Syntax: CALL PLOTND

Arguments: None.

You must call PLOTND (or PLOT ( 0., 0., 999) ) as the last plotting call in the application program.

PLSMIN

Purpose: PLSMIN plots the symbol. Code Example

Syntax: CALL PLSMIN (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the character string to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character.

PRIME

Purpose: PRIME plots the symbol '. Code Example

Syntax: CALL PRIME (XPP, YPP, HEIGHT, ANG, MJUS)

Arguments:

  • XPP, YPP, X, Y coordinates of the symbol to be plotted. Plotting may be continued from the end of a previously plotted character when used in conjunction with any of the subroutines which support continuation.
  • HEIGHT Height of symbol to be plotted.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • MJUS Controls the justification of the symbol to be plotted.
  • If MJUS = 0, (XPP, YPP) denotes the position of the lower left corner of the character.
  • If MJUS = 1, (XPP, YPP) denotes the position of the center of the character.
  • If MJUS = 2, (XPP, YPP) denotes the position of the lower right corner of the character.

PSINIT

Purpose: PSINIT is called to begin a plotting session. It must be called before any other plotting command, with the exception of NEWDEV.

Syntax: CALL PSINIT (PRTRT)

Arguments:

PRTRT Logical variable indicating the paper orientation. If PRTRT=.TRUE., the paper is oriented in portrait mode, i.e. long side of page is vertical. If PRTRT=.false., the paper is oriented in landscape mode, i.e. long side of page is horizontal.

RECT

Purpose: RECT draws a rectangle (or square). Code Example

Syntax: CALL RECT (XX1, YY1, XX2, YY2, HEIGHT)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.

RECTFILC

Purpose: RECTFILC draws a rectangle (or square) and fills it with a specified red, green, and blue color levels.

Syntax: CALL RECTFILC (XX1, YY1, XX2, YY2, HEIGHT, RED, GREEN BLUE)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.
  • RED, GREEN, BLUE RGB values of the fill color. Must lie between 0. and 1., inclusively.

RECTFILG

Purpose: RECTFILG draws a rectangle (or square) and fills it with a specified gray level. Code Example

Syntax: CALL RECTFILG (XX1, YY1, XX2, YY2, HEIGHT, GRYLEV)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • XX2, YY2 X, Y coordinates of lower right corner of rectangle.
  • HEIGHT Height of rectangle.
  • GRYLEV Gray level to use for filling rectangle. GRYLEV must lie between 0. (black) and 1. (white), inclusive.

ROTATE

Purpose: ROTATE rotates the current coordinate system by a specified angle. Essentially, ROTATE issues the PostScript rotate command.

Syntax: CALL ROTATE ( ANG )

Arguments:

ANGLE Angle, measured counterclockwise, to rotate the current coordinate system.

RRECT

Purpose: RRECT draws a rectangle (or square).with rounded corners. It can then fill the rectangle with the current gray level or RGB values. Code Example

Syntax: CALL RRECT (XX1, YY1, WIDTH, HEIGHT, RAD, ANG, FILL)

Arguments:

  • XX1, YY1 X, Y coordinates of lower left corner of rectangle.
  • WIDTH Width of rectangle.
  • HEIGHT Height of rectangle.
  • RAD Radius of rectangle corner curves.
  • ANG Angle of rectangle rotation.
  • FILL Logical value. If FILL=.true., then the rectangle is filled with the current gray level or RGB values; otherwise, the rectangle is outlined.

Subroutines S-Z

SETCOLR

Purpose: SETCOLR sets the current red, green, and blue color levels.

Syntax: CALL SETCOLR (RED, GREEN, BLUE)

Arguments:

  • RED Red color saturation level, between 0. and 1.0.
  • GREEN Green color saturation level, between 0. and 1.0.
  • BLUE Blue color saturation level, between 0. and 1.0.

SETFNT

Purpose: SETFNT sets the current font. Code Example

Syntax: CALL SETFNT (NFONT)

Arguments:

  • NFONT Number of desired font between 1 and 35 (see table below).
  • The fonts sets 29 (Symbol) and 35 (Zapf Dingbats) require the octal code of the character to be plotted. Click the appropriate table to see the character sets and corresponding octal code values for these two fonts. Symbol Zapf Dingbats

SETGRY

Purpose: SETGRY sets the current gray level. Code Example

Syntax: CALL SETGRY (GRYLVL)

Arguments:

GRYLVL Gray level between 0. (black) and 1. (white).

SETLW

Purpose: SETLW sets the current line width. Code Example

Syntax: CALL SETLW (RLW)

Arguments:

  • RLW Line width.
  • After calling SETLW, RLW remains the current line width until SETLW is called again.

SIGMA

Purpose: SIGMA draws the symbol , with upper and lower limits. Code Example

Syntax: CALL SIGMA (XPP, YPP, HEIGHT, ANG, LOWER, NL, LUPPER, NU)

Arguments:

  • XPP, YPP X, Y coordinates of the lower left edge of the symbol.
  • HEIGHT Height of the symbol.
  • ANG Angle, measured counterclockwise from the X-axis, at which the symbol is to be plotted.
  • LOWER Character string specifying the lower limit (Hollerith).
  • NL Number of characters in the lower limit character string.
  • LUPPER Character string specifying the upper limit (Hollerith).
  • NU Number of characters in the upper limit character string.
  • If NL (NU) is set to -999, then LOWER (LUPPER) is the octal code of the character in the font SYMBOL.

SLDCRV

Purpose: SLDCRV connects points in two data arrays using a line with a specified thickness. Code Example

Syntax: CALL SLDCRV (XARR, YARR, NPTS, THK)

Arguments:

  • XARR Array containing the X coordinates of the data points to be plotted.
  • YARR Array containing the Y coordinates of the data points to be plotted.
  • NPTS Number of points in the curve.
  • THK Specifies the thickness of the curve. If THK = 0., the current line width is used.

SLDLIN

Purpose: SLDLIN connects two points using a line with a specified thickness. Code Example

Syntax: CALL SLDLIN (X1, Y1, X2, Y2, THK)

Arguments:

  • X1, Y1 X, Y coordinates of first data point.
  • X2, Y2 X, Y coordinates of second data point.
  • THK Specifies the thickness of the connecting line. If THK=0., the current line width is used.

SQRSGN

Purpose: SQRSGN draws a radical (square root) sign. Code Example

Syntax: CALL SQRSGN (XPP, YPP, HEIGHT, RLEN)

Arguments:

  • XPP, YPP, X, Y coordinates of lower left corner of the radical.
  • HEIGHT Height of the radical.
  • RLEN Length of the top of the radical.

SQUARE

Purpose: SQUARE draws a centered square. Code Example

Syntax: CALL SQUARE (XC, YC, SIDE)

Arguments:

  • XC, YC X, Y coordinates of the center of the square.
  • SIDE Length of the sides of the square.

STROKE

Purpose: STROKE calls the PostScript operator stroke (which paints or draws the current path).

Syntax: CALL STROKE

Arguments: None.

SUBBER

Purpose: SUBBER draws a subscript. Code Example

Syntax: CALL SUBBER (ISUB, NSUB, SIZE, ANG)

Arguments:

  • ISUB Hollerith variable specifying the subscript character string.
  • NSUB Number of characters in the subscript.
  • SIZE Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBBER must be called immediately after the call to create the subscripted variable.

SUBBERSP

Purpose:SUBBERSP draws a subscript of "special" characters. Code Example

Syntax: CALL SUBBERSP (NSET, NFNT, ITITLE, NCHR, HEIGHT, ANG

Arguments:

  • NSET Number of different font sets needed.
  • NFNT Array holding the font numbers 1 to NSET.
  • ITITLE ITITLE holds the octal codes for characters of fonts 29 or 35; otherwise, it hold the text characters themselves.
  • NCHR Number of characters of a given font. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBBERSP must be called immediately after the call to create the subscripted variable.

SUBSUP

Purpose: SUBSUP draws a subscript and superscript. Code Example

Syntax: CALL SUBSUP (ISUB, NSUB, ISUP, NSUP, SIZE, ANG)

Arguments:

  • ISUB Hollerith variable specifying the subscript character string.
  • NSUB Number of characters in the subscript.
  • ISUP Hollerith variable specifying the superscript character string.
  • NSUP Number of characters in the superscript.
  • SIZE Height of the variable to be subscripted and superscripted. It is not the height of the subscript and superscript characters themselves.
  • ANG Angle of the subscripted and superscripted variable.

Note: SUBSUP must be called immediately after the call to create the subscripted and superscripted variable.

SUBSUPSP

Purpose: SUBSUPSP draws subscripts and superscripts of "special" characters. Code Example

Syntax: CALL SUBSUPSP (NSUB, NFNTSB, ITITLESB, NCHRSB, NSUP, NFNTSP, ITITLESP, NCHRSP, HEIGHT, ANG)

Arguments:

  • NSUB, NSUP Number of different font sets needed for subscripts and superscripts, respectively.
  • NFNTSB, NFNTSP Arrays holding the font numbers 1 to NSET for subscripts and superscripts, respectively.
  • ITITLESB, ITITLESP Arrays holding the octal codes for characters of fonts 29 or 35; otherwise, holding text characters themselves.
  • NCHRSB, NCHRSP Number of characters of a given font for subscripts and superscripts, respectively. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be subscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the subscripted variable.

Note: SUBSUPSP must be called immediately after the call to create the subscripted variable.

SUPER

Purpose: SUPER draws a superscript. Code Example

Syntax: CALL SUPER (ISUP, NSUP, SIZE, ANG)

Arguments:

  • ISUP Hollerith variable specifying the superscript character string.
  • NSUP Number of characters in the superscript.
  • SIZE Height of the variable to be superscripted. It is not the height of the subscript characters themselves.
  • ANG Angle of the superscripted variable.

Note: SUPER must be called immediately after the call to create the superscripted variable.

SUPERSP

Purpose: SUPERSP draws a superscript of "special" characters. Code Example

Syntax: CALL SUPERSP (NSET, NFNT, ITITLE, NCHR, HEIGHT, ANG)

Arguments:

  • NSET Number of different font sets needed.
  • NFNT Array holding the font numbers 1 to NSET.
  • ITITLE ITITLE holds the octal codes for characters of fonts 29 or 35; otherwise, it hold the text characters themselves.
  • NCHR Number of characters of a given font. Usually one, but can be greater than one for fonts other than 29 and 35.
  • HEIGHT Height of the variable to be superscripted. It is not the height of the superscript characters themselves.
  • ANG Angle of the superscripted variable.

Note: SUPERSP must be called immediately after the call to create the superscripted variable.

SYMBOL

Purpose: SYMBOL plots a character string. It is similar to subroutine KEKSYM, except that justification and continuation are not supported. Code Example

Syntax: CALL SYMBOL (XPP, YPP, HEIGHT, IBCD, ANG, NCHAR)

Arguments:

  • XPP, YPP, X, Y coordinates of the lower left corner of the first character of the string to be plotted.
  • HEIGHT Height of character string to be plotted.
  • IBCD Character string to be plotted (Hollerith).
  • ANG Angle, measured counterclockwise from the X-axis, at which the character string is to be plotted.
  • NCHAR Number of characters in the string.
Return to top of page