home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / pgplot5.1 / pgplot5 / pgplot5.1.0 / doc / pgplot.doc < prev    next >
Encoding:
Text File  |  1996-05-13  |  139.0 KB  |  3,400 lines

  1. PGPLOT GRAPHICS SUBROUTINE LIBRARY Version 5.1
  2.  
  3. PGPLOT is a Fortran subroutine package for drawing graphs on a variety
  4. of display devices. For more details, see the manual ``PGPLOT Graphics
  5. Subroutine Library'' available from T. J. Pearson
  6. (tjp@astro.caltech.edu).
  7.  
  8. INDEX OF ROUTINES
  9.  
  10. PGARRO -- draw an arrow
  11. PGASK -- control new page prompting
  12. PGBAND -- read cursor position, with anchor
  13. PGBBUF -- begin batch of output (buffer)
  14. PGBEG -- begin PGPLOT, open output device
  15. PGBIN -- histogram of binned data
  16. PGBOX -- draw labeled frame around viewport
  17. PGCIRC -- draw a filled or outline circle
  18. PGCLOS -- close the selected graphics device
  19. PGCONB -- contour map of a 2D data array, with blanking
  20. PGCONL -- label contour map of a 2D data array 
  21. PGCONS -- contour map of a 2D data array (fast algorithm)
  22. PGCONT -- contour map of a 2D data array (contour-following)
  23. PGCONX -- contour map of a 2D data array (non rectangular)
  24. PGCTAB -- install the color table to be used by PGIMAG
  25. PGCURS -- read cursor position
  26. PGDRAW -- draw a line from the current pen position to a point
  27. PGEBUF -- end batch of output (buffer)
  28. PGEND -- terminate PGPLOT
  29. PGENV -- set window and viewport and draw labeled frame
  30. PGERAS -- erase all graphics from current page
  31. PGERRB -- horizontal or vertical error bar
  32. PGERRX -- horizontal error bar
  33. PGERRY -- vertical error bar
  34. PGETXT -- erase text from graphics display
  35. PGFUNT -- function defined by X = F(T), Y = G(T)
  36. PGFUNX -- function defined by Y = F(X)
  37. PGFUNY -- function defined by X = F(Y)
  38. PGGRAY -- gray-scale map of a 2D data array
  39. PGHI2D -- cross-sections through a 2D data array
  40. PGHIST -- histogram of unbinned data
  41. PGIDEN -- write username, date, and time at bottom of plot
  42. PGIMAG -- color image from a 2D data array
  43. PGLAB -- write labels for x-axis, y-axis, and top of plot
  44. PGLCUR -- draw a line using the cursor
  45. PGLDEV -- list available device types
  46. PGLEN -- find length of a string in a variety of units
  47. PGLINE -- draw a polyline (curve defined by line-segments)
  48. PGMOVE -- move pen (change current pen position)
  49. PGMTXT -- write text at position relative to viewport
  50. PGNCUR -- mark a set of points using the cursor
  51. PGNUMB -- convert a number into a plottable character string
  52. PGOLIN -- mark a set of points using the cursor
  53. PGOPEN -- open a graphics device
  54. PGPAGE -- advance to new page
  55. PGPANL -- switch to a different panel on the view surface
  56. PGPAP -- change the size of the view surface 
  57. PGPIXL -- draw pixels
  58. PGPNTS -- draw one or more graph markers, not all the same
  59. PGPOLY -- fill a polygonal area with shading
  60. PGPT -- draw one or more graph markers
  61. PGPTXT -- write text at arbitrary position and angle
  62. PGQAH -- inquire arrow-head style
  63. PGQCF -- inquire character font
  64. PGQCH -- inquire character height
  65. PGQCI -- inquire color index
  66. PGQCIR -- inquire color index range
  67. PGQCOL -- inquire color capability
  68. PGQCR  -- inquire color representation
  69. PGQCS  -- inquire character height in a variety of units
  70. PGQFS -- inquire fill-area style
  71. PGQHS -- inquire hatching style
  72. PGQID -- inquire current device identifier
  73. PGQINF -- inquire PGPLOT general information
  74. PGQITF -- inquire image transfer function
  75. PGQLS -- inquire line style
  76. PGQLW -- inquire line width
  77. PGQPOS -- inquire current pen position
  78. PGQTBG -- inquire text background color index
  79. PGQTXT -- find bounding box of text string
  80. PGQVP -- inquire viewport size and position
  81. PGQVSZ -- find the window defined by the full view surface
  82. PGQWIN -- inquire window boundary coordinates
  83. PGRECT -- draw a rectangle, using fill-area attributes
  84. PGRND -- find the smallest `round' number greater than x
  85. PGRNGE -- choose axis limits
  86. PGSAH -- set arrow-head style
  87. PGSAVE -- save PGPLOT attributes
  88. PGUNSA -- restore PGPLOT attributes
  89. PGSCF -- set character font
  90. PGSCH -- set character height
  91. PGSCI -- set color index
  92. PGSCIR -- set color index range
  93. PGSCR -- set color representation
  94. PGSCRN -- set color representation by name
  95. PGSFS -- set fill-area style
  96. PGSHLS -- set color representation using HLS system
  97. PGSHS -- set hatching style
  98. PGSITF -- set image transfer function
  99. PGSLCT -- select an open graphics device
  100. PGSLS -- set line style
  101. PGSLW -- set line width
  102. PGSTBG -- set text background color index
  103. PGSUBP -- subdivide view surface into panels
  104. PGSVP -- set viewport (normalized device coordinates)
  105. PGSWIN -- set window
  106. PGTBOX -- draw frame and write (DD) HH MM SS.S labelling
  107. PGTEXT -- write text (horizontal, left-justified)
  108. PGUPDT -- update display
  109. PGVECT -- vector map of a 2D data array, with blanking
  110. PGVSIZ -- set viewport (inches)
  111. PGVSTD -- set standard (default) viewport
  112. PGWEDG -- annotate an image plot with a wedge
  113. PGWNAD -- set window and adjust viewport to same aspect ratio
  114. PGADVANCE -- non-standard alias for PGPAGE
  115. PGBEGIN -- non-standard alias for PGBEG
  116. PGCURSE -- non-standard alias for PGCURS
  117. PGLABEL -- non-standard alias for PGLAB
  118. PGMTEXT -- non-standard alias for PGMTXT
  119. PGNCURSE -- non-standard alias for PGNCUR
  120. PGPAPER -- non-standard alias for PGPAP
  121. PGPOINT -- non-standard alias for PGPT
  122. PGPTEXT -- non-standard alias for PGPTXT
  123. PGVPORT -- non-standard alias for PGSVP
  124. PGVSIZE -- non-standard alias for PGVSIZ
  125. PGVSTAND -- non-standard alias for PGVSTD
  126. PGWINDOW -- non-standard alias for PGSWIN
  127.  
  128.  
  129. ------------------------------------------------------------------------
  130. Module: PGARRO -- draw an arrow
  131. ------------------------------------------------------------------------
  132.  
  133.       SUBROUTINE PGARRO (X1, Y1, X2, Y2)
  134.       REAL X1, Y1, X2, Y2
  135.  
  136. Draw an arrow from the point with world-coordinates (X1,Y1) to 
  137. (X2,Y2). The size of the arrowhead at (X2,Y2) is determined by 
  138. the current character size set by routine PGSCH. The default size 
  139. is 1/40th of the smaller of the width or height of the view surface.
  140. The appearance of the arrowhead (shape and solid or open) is
  141. controlled by routine PGSAH.
  142.  
  143. Arguments:
  144.  X1, Y1 (input)  : world coordinates of the tail of the arrow.
  145.  X2, Y2 (input)  : world coordinates of the head of the arrow.
  146.  
  147.  
  148. ------------------------------------------------------------------------
  149. Module: PGASK -- control new page prompting
  150. ------------------------------------------------------------------------
  151.  
  152.       SUBROUTINE PGASK (FLAG)
  153.       LOGICAL FLAG
  154.  
  155. Change the ``prompt state'' of PGPLOT. If the prompt state is
  156. ON, PGPAGE will type ``Type RETURN for next page:'' and will wait
  157. for the user to type a carriage-return before starting a new page.
  158. The initial prompt state (after a call to PGBEG) is ON for 
  159. interactive devices. Prompt state is always OFF for non-interactive 
  160. devices.
  161.  
  162. Arguments:
  163.  FLAG   (input)  : if .TRUE., and if the device is an interactive
  164.                    device, the prompt state will be set to ON. If
  165.                    .FALSE., the prompt state will be set to OFF.
  166.  
  167.  
  168. ------------------------------------------------------------------------
  169. Module: PGBAND -- read cursor position, with anchor
  170. ------------------------------------------------------------------------
  171.  
  172.       INTEGER FUNCTION PGBAND (MODE, POSN, XREF, YREF, X, Y, CH)
  173.       INTEGER MODE, POSN
  174.       REAL XREF, YREF, X, Y
  175.       CHARACTER*(*) CH
  176.  
  177. Read the cursor position and a character typed by the user.
  178. The position is returned in world coordinates.  PGBAND positions
  179. the cursor at the position specified (if POSN=1), allows the user to
  180. move the cursor using the mouse or arrow keys or whatever is available
  181. on the device. When he has positioned the cursor, the user types a
  182. single character on the keyboard; PGBAND then returns this
  183. character and the new cursor position (in world coordinates).
  184.  
  185. Some interactive devices offer a selection of cursor types,
  186. implemented as thin lines that move with the cursor, but without
  187. erasing underlying graphics. Of these types, some extend between
  188. a stationary anchor-point at XREF,YREF, and the position of the
  189. cursor, while others simply follow the cursor without changing shape
  190. or size. The cursor type is specified with one of the following MODE
  191. values. Cursor types that are not supported by a given device, are
  192. treated as MODE=0.
  193.  
  194. -- If MODE=0, the anchor point is ignored and the routine behaves
  195. like PGCURS.
  196. -- If MODE=1, a straight line is drawn joining the anchor point 
  197. and the cursor position.
  198. -- If MODE=2, a hollow rectangle is extended as the cursor is moved,
  199. with one vertex at the anchor point and the opposite vertex at the
  200. current cursor position; the edges of the rectangle are horizontal
  201. and vertical.
  202. -- If MODE=3, two horizontal lines are extended across the width of
  203. the display, one drawn through the anchor point and the other
  204. through the moving cursor position. This could be used to select
  205. a Y-axis range when one end of the range is known.
  206. -- If MODE=4, two vertical lines are extended over the height of
  207. the display, one drawn through the anchor point and the other
  208. through the moving cursor position. This could be used to select an
  209. X-axis range when one end of the range is known.
  210. -- If MODE=5, a horizontal line is extended through the cursor
  211. position over the width of the display. This could be used to select
  212. an X-axis value such as the start of an X-axis range. The anchor point
  213. is ignored.
  214. -- If MODE=6, a vertical line is extended through the cursor
  215. position over the height of the display. This could be used to select
  216. a Y-axis value such as the start of a Y-axis range. The anchor point
  217. is ignored.
  218. -- If MODE=7, a cross-hair, centered on the cursor, is extended over
  219. the width and height of the display. The anchor point is ignored.
  220.  
  221. Returns:
  222.  PGBAND          : 1 if the call was successful; 0 if the device
  223.                    has no cursor or some other error occurs.
  224. Arguments:
  225.  MODE   (input)  : display mode (0, 1, ..7: see above).
  226.  POSN   (input)  : if POSN=1, PGBAND attempts to place the cursor
  227.                    at point (X,Y); if POSN=0, it leaves the cursor
  228.                    at its current position. (On some devices this
  229.                    request may be ignored.)
  230.  XREF   (input)  : the world x-coordinate of the anchor point.
  231.  YREF   (input)  : the world y-coordinate of the anchor point.
  232.  X      (in/out) : the world x-coordinate of the cursor.
  233.  Y      (in/out) : the world y-coordinate of the cursor.
  234.  CH     (output) : the character typed by the user; if the device has
  235.                    no cursor or if some other error occurs, the value
  236.                    CHAR(0) [ASCII NUL character] is returned.
  237.  
  238. Note: The cursor coordinates (X,Y) may be changed by PGBAND even if
  239. the device has no cursor or if the user does not move the cursor.
  240. Under these circumstances, the position returned in (X,Y) is that of
  241. the pixel nearest to the requested position.
  242.  
  243.  
  244. ------------------------------------------------------------------------
  245. Module: PGBBUF -- begin batch of output (buffer)
  246. ------------------------------------------------------------------------
  247.  
  248.       SUBROUTINE PGBBUF
  249.  
  250. Begin saving graphical output commands in an internal buffer; the
  251. commands are held until a matching PGEBUF call (or until the buffer
  252. is emptied by PGUPDT). This can greatly improve the efficiency of
  253. PGPLOT.  PGBBUF increments an internal counter, while PGEBUF
  254. decrements this counter and flushes the buffer to the output
  255. device when the counter drops to zero.  PGBBUF and PGEBUF calls
  256. should always be paired.
  257.  
  258. Arguments: none
  259.  
  260.  
  261. ------------------------------------------------------------------------
  262. Module: PGBEG -- begin PGPLOT, open output device
  263. ------------------------------------------------------------------------
  264.  
  265.       INTEGER FUNCTION PGBEG (UNIT, FILE, NXSUB, NYSUB)
  266.       INTEGER       UNIT
  267.       CHARACTER*(*) FILE
  268.       INTEGER       NXSUB, NYSUB
  269.  
  270. Begin PGPLOT, open the plot file.  A call to PGBEG is
  271. required before any other calls to PGPLOT subroutines.  If a plot
  272. file is already open for PGPLOT output, it is closed before the new
  273. file is opened.
  274.  
  275. Returns:
  276.  PGBEG         : a status return value. A value of 1 indicates
  277.                    successful completion, any other value indicates
  278.                    an error. In the event of error a message is
  279.                    written on the standard error unit.  
  280.                    To test the return value, call
  281.                    PGBEG as a function, eg IER=PGBEG(...); note
  282.                    that PGBEG must be declared INTEGER in the
  283.                    calling program.
  284. Arguments:
  285.  UNIT  (input)   : this argument is ignored by PGBEG (use zero).
  286.  FILE  (input)   : the "device specification" for the plot device.
  287.                    Device specifications are installation dependent,
  288.                    but usually have the form "device/type" or
  289.                    "file/type". If this argument is a
  290.                    question mark ('?'), PGBEG will prompt the user
  291.                    to supply a string. If the argument is a blank
  292.                    string (' '), PGBEG will use the value of
  293.                    environment variable PGPLOT_DEV.
  294.  NXSUB  (input)  : the number of subdivisions of the view surface in
  295.                    X (>0 or <0).
  296.  NYSUB  (input)  : the number of subdivisions of the view surface in
  297.                    Y (>0).
  298.                    PGPLOT puts NXSUB x NYSUB graphs on each plot
  299.                    page or screen; when the view surface is sub-
  300.                    divided in this way, PGPAGE moves to the next
  301.                    panel, not the  next physical page. If
  302.                    NXSUB > 0, PGPLOT uses the panels in row
  303.                    order; if <0, PGPLOT uses them in column order.
  304.  
  305.  
  306. ------------------------------------------------------------------------
  307. Module: PGBIN -- histogram of binned data
  308. ------------------------------------------------------------------------
  309.  
  310.       SUBROUTINE PGBIN (NBIN, X, DATA, CENTER)
  311.       INTEGER NBIN
  312.       REAL X(*), DATA(*)
  313.       LOGICAL CENTER
  314.  
  315. Plot a histogram of NBIN values with X(1..NBIN) values along
  316. the ordinate, and DATA(1...NBIN) along the abscissa. Bin width is
  317. spacing between X values.
  318.  
  319. Arguments:
  320.  NBIN   (input)  : number of values.
  321.  X      (input)  : abscissae of bins.
  322.  DATA   (input)  : data values of bins.
  323.  CENTER (input)  : if .TRUE., the X values denote the center of the
  324.                    bin; if .FALSE., the X values denote the lower
  325.                    edge (in X) of the bin.
  326.  
  327.  
  328. ------------------------------------------------------------------------
  329. Module: PGBOX -- draw labeled frame around viewport
  330. ------------------------------------------------------------------------
  331.  
  332.       SUBROUTINE PGBOX (XOPT, XTICK, NXSUB, YOPT, YTICK, NYSUB)
  333.       CHARACTER*(*) XOPT, YOPT
  334.       REAL XTICK, YTICK
  335.       INTEGER NXSUB, NYSUB
  336.  
  337. Annotate the viewport with frame, axes, numeric labels, etc.
  338. PGBOX is called by on the user's behalf by PGENV, but may also be
  339. called explicitly.
  340.  
  341. Arguments:
  342.  XOPT   (input)  : string of options for X (horizontal) axis of
  343.                    plot. Options are single letters, and may be in
  344.                    any order (see below).
  345.  XTICK  (input)  : world coordinate interval between major tick marks
  346.                    on X axis. If XTICK=0.0, the interval is chosen by
  347.                    PGBOX, so that there will be at least 3 major tick
  348.                    marks along the axis.
  349.  NXSUB  (input)  : the number of subintervals to divide the major
  350.                    coordinate interval into. If XTICK=0.0 or NXSUB=0,
  351.                    the number is chosen by PGBOX.
  352.  YOPT   (input)  : string of options for Y (vertical) axis of plot.
  353.                    Coding is the same as for XOPT.
  354.  YTICK  (input)  : like XTICK for the Y axis.
  355.  NYSUB  (input)  : like NXSUB for the Y axis.
  356.  
  357. Options (for parameters XOPT and YOPT):
  358.  A : draw Axis (X axis is horizontal line Y=0, Y axis is vertical
  359.      line X=0).
  360.  B : draw bottom (X) or left (Y) edge of frame.
  361.  C : draw top (X) or right (Y) edge of frame.
  362.  G : draw Grid of vertical (X) or horizontal (Y) lines.
  363.  I : Invert the tick marks; ie draw them outside the viewport
  364.      instead of inside.
  365.  L : label axis Logarithmically (see below).
  366.  N : write Numeric labels in the conventional location below the
  367.      viewport (X) or to the left of the viewport (Y).
  368.  P : extend ("Project") major tick marks outside the box (ignored if
  369.      option I is specified).
  370.  M : write numeric labels in the unconventional location above the
  371.      viewport (X) or to the right of the viewport (Y).
  372.  T : draw major Tick marks at the major coordinate interval.
  373.  S : draw minor tick marks (Subticks).
  374.  V : orient numeric labels Vertically. This is only applicable to Y.
  375.      The default is to write Y-labels parallel to the axis.
  376.  1 : force decimal labelling, instead of automatic choice (see PGNUMB).
  377.  2 : force exponential labelling, instead of automatic.
  378.  
  379. To get a complete frame, specify BC in both XOPT and YOPT.
  380. Tick marks, if requested, are drawn on the axes or frame
  381. or both, depending which are requested. If none of ABC is specified,
  382. tick marks will not be drawn. When PGENV calls PGBOX, it sets both
  383. XOPT and YOPT according to the value of its parameter AXIS:
  384. -1: 'BC', 0: 'BCNST', 1: 'ABCNST', 2: 'ABCGNST'.
  385.  
  386. For a logarithmic axis, the major tick interval is always 1.0. The
  387. numeric label is 10**(x) where x is the world coordinate at the
  388. tick mark. If subticks are requested, 8 subticks are drawn between
  389. each major tick at equal logarithmic intervals.
  390.  
  391. To label an axis with time (days, hours, minutes, seconds) or
  392. angle (degrees, arcmin, arcsec), use routine PGTBOX.
  393.  
  394.  
  395. ------------------------------------------------------------------------
  396. Module: PGCIRC -- draw a filled or outline circle
  397. ------------------------------------------------------------------------
  398.  
  399.       SUBROUTINE PGCIRC (XCENT, YCENT, RADIUS)
  400.       REAL XCENT, YCENT, RADIUS
  401.  
  402. Draw a circle. The action of this routine depends
  403. on the setting of the Fill-Area Style attribute. If Fill-Area Style
  404. is SOLID (the default), the interior of the circle is solid-filled
  405. using the current Color Index. If Fill-Area Style is HOLLOW, the
  406. outline of the circle is drawn using the current line attributes
  407. (color index, line-style, and line-width).
  408.  
  409. Arguments:
  410.  XCENT  (input)  : world x-coordinate of the center of the circle.
  411.  YCENT  (input)  : world y-coordinate of the center of the circle.
  412.  RADIUS (input)  : radius of circle (world coordinates).
  413.  
  414.  
  415. ------------------------------------------------------------------------
  416. Module: PGCLOS -- close the selected graphics device
  417. ------------------------------------------------------------------------
  418.  
  419.       SUBROUTINE PGCLOS
  420.  
  421. Close the currently selected graphics device. After the device has
  422. been closed, either another open device must be selected with PGSLCT
  423. or another device must be opened with PGOPEN before any further
  424. plotting can be done. If the call to PGCLOS is omitted, some or all 
  425. of the plot may be lost.
  426.  
  427. [This routine was added to PGPLOT in Version 5.1.0. Older programs
  428. use PGEND instead.]
  429.  
  430. Arguments: none
  431.  
  432.  
  433. ------------------------------------------------------------------------
  434. Module: PGCONB -- contour map of a 2D data array, with blanking
  435. ------------------------------------------------------------------------
  436.  
  437.       SUBROUTINE PGCONB (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR, 
  438.      1                   BLANK)
  439.       INTEGER IDIM, JDIM, I1, I2, J1, J2, NC
  440.       REAL    A(IDIM,JDIM), C(*), TR(6), BLANK
  441.  
  442. Draw a contour map of an array. This routine is the same as PGCONS,
  443. except that array elements that have the "magic value" defined by
  444. argument BLANK are ignored, making gaps in the contour map. The
  445. routine may be useful for data measured on most but not all of the
  446. points of a grid.
  447.  
  448. Arguments:
  449.  A      (input)  : data array.
  450.  IDIM   (input)  : first dimension of A.
  451.  JDIM   (input)  : second dimension of A.
  452.  I1,I2  (input)  : range of first index to be contoured (inclusive).
  453.  J1,J2  (input)  : range of second index to be contoured (inclusive).
  454.  C      (input)  : array of contour levels (in the same units as the
  455.                    data in array A); dimension at least NC.
  456.  NC     (input)  : number of contour levels (less than or equal to
  457.                    dimension of C). The absolute value of this
  458.                    argument is used (for compatibility with PGCONT,
  459.                    where the sign of NC is significant).
  460.  TR     (input)  : array defining a transformation between the I,J
  461.                    grid of the array and the world coordinates. The
  462.                    world coordinates of the array point A(I,J) are
  463.                    given by:
  464.                      X = TR(1) + TR(2)*I + TR(3)*J
  465.                      Y = TR(4) + TR(5)*I + TR(6)*J
  466.                    Usually TR(3) and TR(5) are zero - unless the
  467.                    coordinate transformation involves a rotation
  468.                    or shear.
  469.  BLANK   (input) : elements of array A that are exactly equal to
  470.                    this value are ignored (blanked).
  471.  
  472.  
  473. ------------------------------------------------------------------------
  474. Module: PGCONL -- label contour map of a 2D data array 
  475. ------------------------------------------------------------------------
  476.  
  477.       SUBROUTINE PGCONL (A, IDIM, JDIM, I1, I2, J1, J2, C, TR,
  478.      1                   LABEL, INTVAL, MININT)
  479.       INTEGER IDIM, JDIM, I1, J1, I2, J2, INTVAL, MININT
  480.       REAL A(IDIM,JDIM), C, TR(6)
  481.       CHARACTER*(*) LABEL
  482.  
  483. Label a contour map drawn with routine PGCONT. Routine PGCONT should
  484. be called first to draw the contour lines, then this routine should be
  485. called to add the labels. Labels are written at intervals along the
  486. contour lines, centered on the contour lines with lettering aligned
  487. in the up-hill direction. Labels are opaque, so a part of the under-
  488. lying contour line is obscured by the label. Labels use the current
  489. attributes (character height, line width, color index, character
  490. font).
  491.  
  492. The first 9 arguments are the same as those supplied to PGCONT, and
  493. should normally be identical to those used with PGCONT. Note that
  494. only one contour level can be specified; tolabel more contours, call
  495. PGCONL for each level.
  496.  
  497. The Label is supplied as a character string in argument LABEL.
  498.  
  499. The spacing of labels along the contour is specified by parameters
  500. INTVAL and MININT. The routine follows the contour through the
  501. array, counting the number of cells that the contour crosses. The
  502. first label will be written in the MININT'th cell, and additional
  503. labels will be written every INTVAL cells thereafter. A contour
  504. that crosses less than MININT cells will not be labelled. Some
  505. experimentation may be needed to get satisfactory results; a good
  506. place to start is INTVAL=20, MININT=10.
  507.  
  508. Arguments:
  509.  A      (input) : data array.
  510.  IDIM   (input) : first dimension of A.
  511.  JDIM   (input) : second dimension of A.
  512.  I1, I2 (input) : range of first index to be contoured (inclusive).
  513.  J1, J2 (input) : range of second index to be contoured (inclusive).
  514.  C      (input) : the level of the contour to be labelled (one of the
  515.                   values given to PGCONT).
  516.  TR     (input) : array defining a transformation between the I,J
  517.                   grid of the array and the world coordinates.
  518.                   The world coordinates of the array point A(I,J)
  519.                   are given by:
  520.                     X = TR(1) + TR(2)*I + TR(3)*J
  521.                     Y = TR(4) + TR(5)*I + TR(6)*J
  522.                   Usually TR(3) and TR(5) are zero - unless the
  523.                   coordinate transformation involves a rotation or
  524.                   shear.
  525.  LABEL  (input) : character strings to be used to label the specified
  526.                   contour. Leading and trailing blank spaces are
  527.                   ignored.
  528.  INTVAL (input) : spacing along the contour between labels, in
  529.                   grid cells.
  530.  MININT (input) : contours that cross less than MININT cells
  531.                   will not be labelled.
  532.  
  533.  
  534. ------------------------------------------------------------------------
  535. Module: PGCONS -- contour map of a 2D data array (fast algorithm)
  536. ------------------------------------------------------------------------
  537.  
  538.       SUBROUTINE PGCONS (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR)
  539.       INTEGER IDIM, JDIM, I1, I2, J1, J2, NC
  540.       REAL    A(IDIM,JDIM), C(*), TR(6)
  541.  
  542. Draw a contour map of an array. The map is truncated if
  543. necessary at the boundaries of the viewport.  Each contour line is
  544. drawn with the current line attributes (color index, style, and
  545. width).  This routine, unlike PGCONT, does not draw each contour as a
  546. continuous line, but draws the straight line segments composing each
  547. contour in a random order.  It is thus not suitable for use on pen
  548. plotters, and it usually gives unsatisfactory results with dashed or
  549. dotted lines.  It is, however, faster than PGCONT, especially if
  550. several contour levels are drawn with one call of PGCONS.
  551.  
  552. Arguments:
  553.  A      (input)  : data array.
  554.  IDIM   (input)  : first dimension of A.
  555.  JDIM   (input)  : second dimension of A.
  556.  I1,I2  (input)  : range of first index to be contoured (inclusive).
  557.  J1,J2  (input)  : range of second index to be contoured (inclusive).
  558.  C      (input)  : array of contour levels (in the same units as the
  559.                    data in array A); dimension at least NC.
  560.  NC     (input)  : number of contour levels (less than or equal to
  561.                    dimension of C). The absolute value of this
  562.                    argument is used (for compatibility with PGCONT,
  563.                    where the sign of NC is significant).
  564.  TR     (input)  : array defining a transformation between the I,J
  565.                    grid of the array and the world coordinates. The
  566.                    world coordinates of the array point A(I,J) are
  567.                    given by:
  568.                      X = TR(1) + TR(2)*I + TR(3)*J
  569.                      Y = TR(4) + TR(5)*I + TR(6)*J
  570.                    Usually TR(3) and TR(5) are zero - unless the
  571.                    coordinate transformation involves a rotation
  572.                    or shear.
  573.  
  574.  
  575. ------------------------------------------------------------------------
  576. Module: PGCONT -- contour map of a 2D data array (contour-following)
  577. ------------------------------------------------------------------------
  578.  
  579.       SUBROUTINE PGCONT (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR)
  580.       INTEGER IDIM, JDIM, I1, J1, I2, J2, NC
  581.       REAL A(IDIM,JDIM), C(*), TR(6)
  582.  
  583. Draw a contour map of an array.  The map is truncated if
  584. necessary at the boundaries of the viewport.  Each contour line
  585. is drawn with the current line attributes (color index, style, and
  586. width); except that if argument NC is positive (see below), the line
  587. style is set by PGCONT to 1 (solid) for positive contours or 2
  588. (dashed) for negative contours.
  589.  
  590. Arguments:
  591.  A      (input) : data array.
  592.  IDIM   (input) : first dimension of A.
  593.  JDIM   (input) : second dimension of A.
  594.  I1, I2 (input) : range of first index to be contoured (inclusive).
  595.  J1, J2 (input) : range of second index to be contoured (inclusive).
  596.  C      (input) : array of NC contour levels; dimension at least NC.
  597.  NC     (input) : +/- number of contour levels (less than or equal
  598.                   to dimension of C). If NC is positive, it is the
  599.                   number of contour levels, and the line-style is
  600.                   chosen automatically as described above. If NC is
  601.                   negative, it is minus the number of contour
  602.                   levels, and the current setting of line-style is
  603.                   used for all the contours.
  604.  TR     (input) : array defining a transformation between the I,J
  605.                   grid of the array and the world coordinates.
  606.                   The world coordinates of the array point A(I,J)
  607.                   are given by:
  608.                     X = TR(1) + TR(2)*I + TR(3)*J
  609.                     Y = TR(4) + TR(5)*I + TR(6)*J
  610.                   Usually TR(3) and TR(5) are zero - unless the
  611.                   coordinate transformation involves a rotation or
  612.                   shear.
  613.  
  614.  
  615. ------------------------------------------------------------------------
  616. Module: PGCONX -- contour map of a 2D data array (non rectangular)
  617. ------------------------------------------------------------------------
  618.  
  619.       SUBROUTINE PGCONX (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, PLOT)
  620.       INTEGER  IDIM, JDIM, I1, J1, I2, J2, NC
  621.       REAL     A(IDIM,JDIM), C(*)
  622.       EXTERNAL PLOT
  623.  
  624. Draw a contour map of an array using a user-supplied plotting
  625. routine.  This routine should be used instead of PGCONT when the
  626. data are defined on a non-rectangular grid.  PGCONT permits only
  627. a linear transformation between the (I,J) grid of the array
  628. and the world coordinate system (x,y), but PGCONX permits any
  629. transformation to be used, the transformation being defined by a
  630. user-supplied subroutine. The nature of the contouring algorithm,
  631. however, dictates that the transformation should maintain the
  632. rectangular topology of the grid, although grid-points may be
  633. allowed to coalesce.  As an example of a deformed rectangular
  634. grid, consider data given on the polar grid theta=0.1n(pi/2),
  635. for n=0,1,...,10, and r=0.25m, for m=0,1,..,4. This grid
  636. contains 55 points, of which 11 are coincident at the origin.
  637. The input array for PGCONX should be dimensioned (11,5), and
  638. data values should be provided for all 55 elements.  PGCONX can
  639. also be used for special applications in which the height of the
  640. contour affects its appearance, e.g., stereoscopic views.
  641.  
  642. The map is truncated if necessary at the boundaries of the viewport.
  643. Each contour line is drawn with the current line attributes (color
  644. index, style, and width); except that if argument NC is positive
  645. (see below), the line style is set by PGCONX to 1 (solid) for
  646. positive contours or 2 (dashed) for negative contours. Attributes
  647. for the contour lines can also be set in the user-supplied
  648. subroutine, if desired.
  649.  
  650. Arguments:
  651.  A      (input) : data array.
  652.  IDIM   (input) : first dimension of A.
  653.  JDIM   (input) : second dimension of A.
  654.  I1, I2 (input) : range of first index to be contoured (inclusive).
  655.  J1, J2 (input) : range of second index to be contoured (inclusive).
  656.  C      (input) : array of NC contour levels; dimension at least NC.
  657.  NC     (input) : +/- number of contour levels (less than or equal
  658.                   to dimension of C). If NC is positive, it is the
  659.                   number of contour levels, and the line-style is
  660.                   chosen automatically as described above. If NC is
  661.                   negative, it is minus the number of contour
  662.                   levels, and the current setting of line-style is
  663.                   used for all the contours.
  664.  PLOT   (input) : the address (name) of a subroutine supplied by
  665.                   the user, which will be called by PGCONX to do
  666.                   the actual plotting. This must be declared
  667.                   EXTERNAL in the program unit calling PGCONX.
  668.  
  669. The subroutine PLOT will be called with four arguments:
  670.      CALL PLOT(VISBLE,X,Y,Z)
  671. where X,Y (input) are real variables corresponding to
  672. I,J indices of the array A. If  VISBLE (input, integer) is 1,
  673. PLOT should draw a visible line from the current pen
  674. position to the world coordinate point corresponding to (X,Y);
  675. if it is 0, it should move the pen to (X,Y). Z is the value
  676. of the current contour level, and may be used by PLOT if desired.
  677. Example:
  678.       SUBROUTINE PLOT (VISBLE,X,Y,Z)
  679.       REAL X, Y, Z, XWORLD, YWORLD
  680.       INTEGER VISBLE
  681.       XWORLD = X*COS(Y) ! this is the user-defined
  682.       YWORLD = X*SIN(Y) ! transformation
  683.       IF (VISBLE.EQ.0) THEN
  684.           CALL PGMOVE (XWORLD, YWORLD)
  685.       ELSE
  686.           CALL PGDRAW (XWORLD, YWORLD)
  687.       END IF
  688.       END
  689.  
  690.  
  691. ------------------------------------------------------------------------
  692. Module: PGCTAB -- install the color table to be used by PGIMAG
  693. ------------------------------------------------------------------------
  694.  
  695.       SUBROUTINE PGCTAB(L, R, G, B, NC, CONTRA, BRIGHT)
  696.       INTEGER NC
  697.       REAL    L(NC), R(NC), G(NC), B(NC), CONTRA, BRIGHT
  698.  
  699. Use the given color table to change the color representations of
  700. all color indexes marked for use by PGIMAG. To change which
  701. color indexes are thus marked, call PGSCIR before calling PGCTAB
  702. or PGIMAG. On devices that can change the color representations
  703. of previously plotted graphics, PGCTAB will also change the colors
  704. of existing graphics that were plotted with the marked color
  705. indexes. This feature can then be combined with PGBAND to
  706. interactively manipulate the displayed colors of data previously
  707. plotted with PGIMAG.
  708.  
  709. Limitations:
  710.  1. Some devices do not propagate color representation changes
  711.     to previously drawn graphics.
  712.  2. Some devices ignore requests to change color representations.
  713.  3. The appearance of specific color representations on grey-scale
  714.     devices is device-dependent.
  715.  
  716. Arguments:
  717.  L      (input)  : An array of NC normalized ramp-intensity levels
  718.                    corresponding to the RGB primary color intensities
  719.                    in R(),G(),B(). Colors on the ramp are linearly
  720.                    interpolated from neighbouring levels.
  721.                    Levels must be sorted in increasing order.
  722.                     0.0 places a color at the beginning of the ramp.
  723.                     1.0 places a color at the end of the ramp.
  724.                    Colors outside these limits are legal, but will
  725.                    not be visible if CONTRA=1.0 and BRIGHT=0.5.
  726.  R      (input)  : An array of NC normalized red intensities.
  727.  G      (input)  : An array of NC normalized green intensities.
  728.  B      (input)  : An array of NC normalized blue intensities.
  729.  NC     (input)  : The number of color table entries.
  730.  CONTRA (input)  : The contrast of the color ramp (normally 1.0).
  731.  BRIGHT (input)  : Brightness at the center colorindex (normally 0.5).
  732.  
  733.  
  734. ------------------------------------------------------------------------
  735. Module: PGCURS -- read cursor position
  736. ------------------------------------------------------------------------
  737.  
  738.       INTEGER FUNCTION PGCURS (X, Y, CH)
  739.       REAL X, Y
  740.       CHARACTER*(*) CH
  741.  
  742. Read the cursor position and a character typed by the user.
  743. The position is returned in world coordinates.  PGCURS positions
  744. the cursor at the position specified, allows the user to move the
  745. cursor using the joystick or arrow keys or whatever is available on
  746. the device. When he has positioned the cursor, the user types a
  747. single character on the keyboard; PGCURS then returns this
  748. character and the new cursor position (in world coordinates).
  749.  
  750. Returns:
  751.  PGCURS         : 1 if the call was successful; 0 if the device
  752.                    has no cursor or some other error occurs.
  753. Arguments:
  754.  X      (in/out) : the world x-coordinate of the cursor.
  755.  Y      (in/out) : the world y-coordinate of the cursor.
  756.  CH     (output) : the character typed by the user; if the device has
  757.                    no cursor or if some other error occurs, the value
  758.                    CHAR(0) [ASCII NUL character] is returned.
  759.  
  760. Note: The cursor coordinates (X,Y) may be changed by PGCURS even if
  761. the device has no cursor or if the user does not move the cursor.
  762. Under these circumstances, the position returned in (X,Y) is that of
  763. the pixel nearest to the requested position.
  764.  
  765.  
  766. ------------------------------------------------------------------------
  767. Module: PGDRAW -- draw a line from the current pen position to a point
  768. ------------------------------------------------------------------------
  769.  
  770.       SUBROUTINE PGDRAW (X, Y)
  771.       REAL X, Y
  772.  
  773. Draw a line from the current pen position to the point
  774. with world-coordinates (X,Y). The line is clipped at the edge of the
  775. current window. The new pen position is (X,Y) in world coordinates.
  776.  
  777. Arguments:
  778.  X      (input)  : world x-coordinate of the end point of the line.
  779.  Y      (input)  : world y-coordinate of the end point of the line.
  780.  
  781.  
  782. ------------------------------------------------------------------------
  783. Module: PGEBUF -- end batch of output (buffer)
  784. ------------------------------------------------------------------------
  785.  
  786.       SUBROUTINE PGEBUF
  787.  
  788. A call to PGEBUF marks the end of a batch of graphical output begun
  789. with the last call of PGBBUF.  PGBBUF and PGEBUF calls should always
  790. be paired. Each call to PGBBUF increments a counter, while each call
  791. to PGEBUF decrements the counter. When the counter reaches 0, the
  792. batch of output is written on the output device.
  793.  
  794. Arguments: none
  795.  
  796.  
  797. ------------------------------------------------------------------------
  798. Module: PGEND -- terminate PGPLOT
  799. ------------------------------------------------------------------------
  800.  
  801.       SUBROUTINE PGEND
  802.  
  803. Terminate PGPLOT, close and release any open graphics devices.
  804. If the call to PGEND is omitted, some or all of any open plots
  805. may be lost.
  806.  
  807. Arguments: none
  808.  
  809.  
  810. ------------------------------------------------------------------------
  811. Module: PGENV -- set window and viewport and draw labeled frame
  812. ------------------------------------------------------------------------
  813.  
  814.       SUBROUTINE PGENV (XMIN, XMAX, YMIN, YMAX, JUST, AXIS)
  815.       REAL XMIN, XMAX, YMIN, YMAX
  816.       INTEGER JUST, AXIS
  817.  
  818. Set PGPLOT "Plotter Environment".  PGENV establishes the scaling
  819. for subsequent calls to PGPT, PGLINE, etc.  The plotter is
  820. advanced to a new page or panel, clearing the screen if necessary.
  821. If the "prompt state" is ON (see PGASK), confirmation
  822. is requested from the user before clearing the screen.
  823. If requested, a box, axes, labels, etc. are drawn according to
  824. the setting of argument AXIS.
  825.  
  826. Arguments:
  827.  XMIN   (input)  : the world x-coordinate at the bottom left corner
  828.                    of the viewport.
  829.  XMAX   (input)  : the world x-coordinate at the top right corner
  830.                    of the viewport (note XMAX may be less than XMIN).
  831.  YMIN   (input)  : the world y-coordinate at the bottom left corner
  832.                    of the viewport.
  833.  YMAX   (input)  : the world y-coordinate at the top right corner
  834.                    of the viewport (note YMAX may be less than YMIN).
  835.  JUST   (input)  : if JUST=1, the scales of the x and y axes (in
  836.                    world coordinates per inch) will be equal,
  837.                    otherwise they will be scaled independently.
  838.  AXIS   (input)  : controls the plotting of axes, tick marks, etc:
  839.      AXIS = -2 : draw no box, axes or labels;
  840.      AXIS = -1 : draw box only;
  841.      AXIS =  0 : draw box and label it with coordinates;
  842.      AXIS =  1 : same as AXIS=0, but also draw the
  843.                  coordinate axes (X=0, Y=0);
  844.      AXIS =  2 : same as AXIS=1, but also draw grid lines
  845.                  at major increments of the coordinates;
  846.      AXIS = 10 : draw box and label X-axis logarithmically;
  847.      AXIS = 20 : draw box and label Y-axis logarithmically;
  848.      AXIS = 30 : draw box and label both axes logarithmically.
  849.  
  850. For other axis options, use routine PGBOX. PGENV can be persuaded to
  851. call PGBOX with additional axis options by defining an environment
  852. parameter PGPLOT_ENVOPT containing the required option codes. 
  853. Examples:
  854.   PGPLOT_ENVOPT=P      ! draw Projecting tick marks
  855.   PGPLOT_ENVOPT=I      ! Invert the tick marks
  856.   PGPLOT_ENVOPT=IV     ! Invert tick marks and label y Vertically
  857.  
  858.  
  859. ------------------------------------------------------------------------
  860. Module: PGERAS -- erase all graphics from current page
  861. ------------------------------------------------------------------------
  862.  
  863.       SUBROUTINE PGERAS
  864.  
  865. Erase all graphics from the current page or panel.
  866.  
  867. Arguments: none
  868.  
  869.  
  870. ------------------------------------------------------------------------
  871. Module: PGERRB -- horizontal or vertical error bar
  872. ------------------------------------------------------------------------
  873.  
  874.       SUBROUTINE PGERRB (DIR, N, X, Y, E, T)
  875.       INTEGER DIR, N
  876.       REAL X(*), Y(*), E(*)
  877.       REAL T
  878.  
  879. Plot error bars in the direction specified by DIR.
  880. This routine draws an error bar only; to mark the data point at
  881. the start of the error bar, an additional call to PGPT is required.
  882.  
  883. Arguments:
  884.  DIR    (input)  : direction to plot the error bar relative to
  885.                    the data point. 
  886.                    One-sided error bar:
  887.                      DIR is 1 for +X (X to X+E);
  888.                             2 for +Y (Y to Y+E);
  889.                             3 for -X (X to X-E);
  890.                             4 for -Y (Y to Y-E).
  891.                    Two-sided error bar:
  892.                      DIR is 5 for +/-X (X-E to X+E); 
  893.                             6 for +/-Y (Y-E to Y+E).
  894.  N      (input)  : number of error bars to plot.
  895.  X      (input)  : world x-coordinates of the data.
  896.  Y      (input)  : world y-coordinates of the data.
  897.  E      (input)  : value of error bar distance to be added to the
  898.                    data position in world coordinates.
  899.  T      (input)  : length of terminals to be drawn at the ends
  900.                    of the error bar, as a multiple of the default
  901.                    length; if T = 0.0, no terminals will be drawn.
  902.  
  903. Note: the dimension of arrays X, Y, and E must be greater
  904. than or equal to N. If N is 1, X, Y, and E may be scalar
  905. variables, or expressions.
  906.  
  907.  
  908. ------------------------------------------------------------------------
  909. Module: PGERRX -- horizontal error bar
  910. ------------------------------------------------------------------------
  911.  
  912.       SUBROUTINE PGERRX (N, X1, X2, Y, T)
  913.       INTEGER N
  914.       REAL X1(*), X2(*), Y(*)
  915.       REAL T
  916.  
  917. Plot horizontal error bars.
  918. This routine draws an error bar only; to mark the data point in
  919. the middle of the error bar, an additional call to PGPT or
  920. PGERRY is required.
  921.  
  922. Arguments:
  923.  N      (input)  : number of error bars to plot.
  924.  X1     (input)  : world x-coordinates of lower end of the
  925.                    error bars.
  926.  X2     (input)  : world x-coordinates of upper end of the
  927.                    error bars.
  928.  Y      (input)  : world y-coordinates of the data.
  929.  T      (input)  : length of terminals to be drawn at the ends
  930.                    of the error bar, as a multiple of the default
  931.                    length; if T = 0.0, no terminals will be drawn.
  932.  
  933. Note: the dimension of arrays X1, X2, and Y must be greater
  934. than or equal to N. If N is 1, X1, X2, and Y may be scalar
  935. variables, or expressions, eg:
  936.       CALL PGERRX(1,X-SIGMA,X+SIGMA,Y)
  937.  
  938.  
  939. ------------------------------------------------------------------------
  940. Module: PGERRY -- vertical error bar
  941. ------------------------------------------------------------------------
  942.  
  943.       SUBROUTINE PGERRY (N, X, Y1, Y2, T)
  944.       INTEGER N
  945.       REAL X(*), Y1(*), Y2(*)
  946.       REAL T
  947.  
  948. Plot vertical error bars.
  949. This routine draws an error bar only; to mark the data point in
  950. the middle of the error bar, an additional call to PGPT or
  951. PGERRX is required.
  952.  
  953. Arguments:
  954.  N      (input)  : number of error bars to plot.
  955.  X      (input)  : world x-coordinates of the data.
  956.  Y1     (input)  : world y-coordinates of top end of the
  957.                    error bars.
  958.  Y2     (input)  : world y-coordinates of bottom end of the
  959.                    error bars.
  960.  T      (input)  : length of terminals to be drawn at the ends
  961.                    of the error bar, as a multiple of the default
  962.                    length; if T = 0.0, no terminals will be drawn.
  963.  
  964. Note: the dimension of arrays X, Y1, and Y2 must be greater
  965. than or equal to N. If N is 1, X, Y1, and Y2 may be scalar
  966. variables or expressions, eg:
  967.       CALL PGERRY(1,X,Y+SIGMA,Y-SIGMA)
  968.  
  969.  
  970. ------------------------------------------------------------------------
  971. Module: PGETXT -- erase text from graphics display
  972. ------------------------------------------------------------------------
  973.  
  974.       SUBROUTINE PGETXT
  975.  
  976. Some graphics terminals display text (the normal interactive dialog)
  977. on the same screen as graphics. This routine erases the text from the
  978. view surface without affecting the graphics. It does nothing on
  979. devices which do not display text on the graphics screen, and on
  980. devices which do not have this capability.
  981.  
  982. Arguments:
  983.  None
  984.  
  985.  
  986. ------------------------------------------------------------------------
  987. Module: PGFUNT -- function defined by X = F(T), Y = G(T)
  988. ------------------------------------------------------------------------
  989.  
  990.       SUBROUTINE PGFUNT (FX, FY, N, TMIN, TMAX, PGFLAG)
  991.       REAL FX, FY
  992.       EXTERNAL FX, FY
  993.       INTEGER N
  994.       REAL TMIN, TMAX
  995.       INTEGER PGFLAG
  996.  
  997. Draw a curve defined by parametric equations X = FX(T), Y = FY(T).
  998.  
  999. Arguments:
  1000.  FX     (external real function): supplied by the user, evaluates
  1001.                    X-coordinate.
  1002.  FY     (external real function): supplied by the user, evaluates
  1003.                    Y-coordinate.
  1004.  N      (input)  : the number of points required to define the
  1005.                    curve. The functions FX and FY will each be
  1006.                    called N+1 times.
  1007.  TMIN   (input)  : the minimum value for the parameter T.
  1008.  TMAX   (input)  : the maximum value for the parameter T.
  1009.  PGFLAG (input)  : if PGFLAG = 1, the curve is plotted in the
  1010.                    current window and viewport; if PGFLAG = 0,
  1011.                    PGENV is called automatically by PGFUNT to
  1012.                    start a new plot with automatic scaling.
  1013.  
  1014. Note: The functions FX and FY must be declared EXTERNAL in the
  1015. Fortran program unit that calls PGFUNT.
  1016.  
  1017.  
  1018. ------------------------------------------------------------------------
  1019. Module: PGFUNX -- function defined by Y = F(X)
  1020. ------------------------------------------------------------------------
  1021.  
  1022.       SUBROUTINE PGFUNX (FY, N, XMIN, XMAX, PGFLAG)
  1023.       REAL FY
  1024.       EXTERNAL FY
  1025.       INTEGER N
  1026.       REAL XMIN, XMAX
  1027.       INTEGER PGFLAG
  1028.  
  1029. Draw a curve defined by the equation Y = FY(X), where FY is a
  1030. user-supplied subroutine.
  1031.  
  1032. Arguments:
  1033.  FY     (external real function): supplied by the user, evaluates
  1034.                    Y value at a given X-coordinate.
  1035.  N      (input)  : the number of points required to define the
  1036.                    curve. The function FY will be called N+1 times.
  1037.                    If PGFLAG=0 and N is greater than 1000, 1000
  1038.                    will be used instead.  If N is less than 1,
  1039.                    nothing will be drawn.
  1040.  XMIN   (input)  : the minimum value of X.
  1041.  XMAX   (input)  : the maximum value of X.
  1042.  PGFLAG (input)  : if PGFLAG = 1, the curve is plotted in the
  1043.                    current window and viewport; if PGFLAG = 0,
  1044.                    PGENV is called automatically by PGFUNX to
  1045.                    start a new plot with X limits (XMIN, XMAX)
  1046.                    and automatic scaling in Y.
  1047.  
  1048. Note: The function FY must be declared EXTERNAL in the Fortran
  1049. program unit that calls PGFUNX.  It has one argument, the
  1050. x-coordinate at which the y value is required, e.g.
  1051.   REAL FUNCTION FY(X)
  1052.   REAL X
  1053.   FY = .....
  1054.   END
  1055.  
  1056.  
  1057. ------------------------------------------------------------------------
  1058. Module: PGFUNY -- function defined by X = F(Y)
  1059. ------------------------------------------------------------------------
  1060.  
  1061.       SUBROUTINE PGFUNY (FX, N, YMIN, YMAX, PGFLAG)
  1062.       REAL    FX
  1063.       EXTERNAL FX
  1064.       INTEGER N
  1065.       REAL    YMIN, YMAX
  1066.       INTEGER PGFLAG
  1067.  
  1068. Draw a curve defined by the equation X = FX(Y), where FY is a
  1069. user-supplied subroutine.
  1070.  
  1071. Arguments:
  1072.  FX     (external real function): supplied by the user, evaluates
  1073.                    X value at a given Y-coordinate.
  1074.  N      (input)  : the number of points required to define the
  1075.                    curve. The function FX will be called N+1 times.
  1076.                    If PGFLAG=0 and N is greater than 1000, 1000
  1077.                    will be used instead.  If N is less than 1,
  1078.                    nothing will be drawn.
  1079.  YMIN   (input)  : the minimum value of Y.
  1080.  YMAX   (input)  : the maximum value of Y.
  1081.  PGFLAG (input)  : if PGFLAG = 1, the curve is plotted in the
  1082.                    current window and viewport; if PGFLAG = 0,
  1083.                    PGENV is called automatically by PGFUNY to
  1084.                    start a new plot with Y limits (YMIN, YMAX)
  1085.                    and automatic scaling in X.
  1086.  
  1087. Note: The function FX must be declared EXTERNAL in the Fortran
  1088. program unit that calls PGFUNY.  It has one argument, the
  1089. y-coordinate at which the x value is required, e.g.
  1090.   REAL FUNCTION FX(Y)
  1091.   REAL Y
  1092.   FX = .....
  1093.   END
  1094.  
  1095.  
  1096. ------------------------------------------------------------------------
  1097. Module: PGGRAY -- gray-scale map of a 2D data array
  1098. ------------------------------------------------------------------------
  1099.  
  1100.       SUBROUTINE PGGRAY (A, IDIM, JDIM, I1, I2, J1, J2,
  1101.      1                   FG, BG, TR)
  1102.       INTEGER IDIM, JDIM, I1, I2, J1, J2
  1103.       REAL    A(IDIM,JDIM), FG, BG, TR(6)
  1104.  
  1105. Draw gray-scale map of an array in current window. The subsection
  1106. of the array A defined by indices (I1:I2, J1:J2) is mapped onto
  1107. the view surface world-coordinate system by the transformation
  1108. matrix TR. The resulting quadrilateral region is clipped at the edge
  1109. of the window and shaded with the shade at each point determined
  1110. by the corresponding array value.  The shade is a number in the
  1111. range 0 to 1 obtained by linear interpolation between the background
  1112. level (BG) and the foreground level (FG), i.e.,
  1113.  
  1114.   shade = [A(i,j) - BG] / [FG - BG]
  1115.  
  1116. The background level BG can be either less than or greater than the
  1117. foreground level FG.  Points in the array that are outside the range
  1118. BG to FG are assigned shade 0 or 1 as appropriate.
  1119.  
  1120. PGGRAY uses two different algorithms, depending how many color
  1121. indices are available in the color index range specified for images.
  1122. (This range is set with routine PGSCIR, and the current or default
  1123. range can be queried by calling routine PGQCIR).
  1124.  
  1125. If 16 or more color indices are available, PGGRAY first assigns
  1126. color representations to these color indices to give a linear ramp
  1127. between the background color (color index 0) and the foreground color
  1128. (color index 1), and then calls PGIMAG to draw the image using these
  1129. color indices. In this mode, the shaded region is "opaque": every
  1130. pixel is assigned a color.
  1131.  
  1132. If less than 16 color indices are available, PGGRAY uses only
  1133. color index 1, and uses  a "dithering" algorithm to fill in pixels,
  1134. with the shade (computed as above) determining the faction of pixels
  1135. that are filled. In this mode the shaded region is "transparent" and
  1136. allows previously-drawn graphics to show through.
  1137.  
  1138. The transformation matrix TR is used to calculate the world
  1139. coordinates of the center of the "cell" that represents each
  1140. array element. The world coordinates of the center of the cell
  1141. corresponding to array element A(I,J) are given by:
  1142.  
  1143.          X = TR(1) + TR(2)*I + TR(3)*J
  1144.          Y = TR(4) + TR(5)*I + TR(6)*J
  1145.  
  1146. Usually TR(3) and TR(5) are zero -- unless the coordinate
  1147. transformation involves a rotation or shear.  The corners of the
  1148. quadrilateral region that is shaded by PGGRAY are given by
  1149. applying this transformation to (I1-0.5,J1-0.5), (I2+0.5, J2+0.5).
  1150.  
  1151. Arguments:
  1152.  A      (input)  : the array to be plotted.
  1153.  IDIM   (input)  : the first dimension of array A.
  1154.  JDIM   (input)  : the second dimension of array A.
  1155.  I1, I2 (input)  : the inclusive range of the first index
  1156.                    (I) to be plotted.
  1157.  J1, J2 (input)  : the inclusive range of the second
  1158.                    index (J) to be plotted.
  1159.  FG     (input)  : the array value which is to appear with the
  1160.                    foreground color (corresponding to color index 1).
  1161.  BG     (input)  : the array value which is to appear with the
  1162.                    background color (corresponding to color index 0).
  1163.  TR     (input)  : transformation matrix between array grid and
  1164.                    world coordinates.
  1165.  
  1166.  
  1167. ------------------------------------------------------------------------
  1168. Module: PGHI2D -- cross-sections through a 2D data array
  1169. ------------------------------------------------------------------------
  1170.  
  1171.       SUBROUTINE PGHI2D (DATA, NXV, NYV, IX1, IX2, IY1, IY2, X, IOFF,
  1172.      1                   BIAS, CENTER, YLIMS)
  1173.       INTEGER NXV, NYV, IX1, IX2, IY1, IY2
  1174.       REAL    DATA(NXV,NYV)
  1175.       REAL    X(IX2-IX1+1), YLIMS(IX2-IX1+1)
  1176.       INTEGER IOFF
  1177.       REAL    BIAS
  1178.       LOGICAL CENTER
  1179.  
  1180. Plot a series of cross-sections through a 2D data array.
  1181. Each cross-section is plotted as a hidden line histogram.  The plot
  1182. can be slanted to give a pseudo-3D effect - if this is done, the
  1183. call to PGENV may have to be changed to allow for the increased X
  1184. range that will be needed.
  1185.  
  1186. Arguments:
  1187.  DATA   (input)  : the data array to be plotted.
  1188.  NXV    (input)  : the first dimension of DATA.
  1189.  NYV    (input)  : the second dimension of DATA.
  1190.  IX1    (input)
  1191.  IX2    (input)
  1192.  IY1    (input)
  1193.  IY2    (input)  : PGHI2D plots a subset of the input array DATA.
  1194.                    This subset is delimited in the first (x)
  1195.                    dimension by IX1 and IX2 and the 2nd (y) by IY1
  1196.                    and IY2, inclusively. Note: IY2 < IY1 is
  1197.                    permitted, resulting in a plot with the
  1198.                    cross-sections plotted in reverse Y order.
  1199.                    However, IX2 must be => IX1.
  1200.  X      (input)  : the abscissae of the bins to be plotted. That is,
  1201.                    X(1) should be the X value for DATA(IX1,IY1), and
  1202.                    X should have (IX2-IX1+1) elements.  The program
  1203.                    has to assume that the X value for DATA(x,y) is
  1204.                    the same for all y.
  1205.  IOFF   (input)  : an offset in array elements applied to successive
  1206.                    cross-sections to produce a slanted effect.  A
  1207.                    plot with IOFF > 0 slants to the right, one with
  1208.                    IOFF < 0 slants left.
  1209.  BIAS   (input)  : a bias value applied to each successive cross-
  1210.                    section in order to raise it above the previous
  1211.                    cross-section.  This is in the same units as the
  1212.                    data.
  1213.  CENTER (input)  : if .true., the X values denote the center of the
  1214.                    bins; if .false. the X values denote the lower
  1215.                    edges (in X) of the bins.
  1216.  YLIMS  (input)  : workspace.  Should be an array of at least
  1217.                    (IX2-IX1+1) elements.
  1218.  
  1219.  
  1220. ------------------------------------------------------------------------
  1221. Module: PGHIST -- histogram of unbinned data
  1222. ------------------------------------------------------------------------
  1223.  
  1224.       SUBROUTINE PGHIST(N, DATA, DATMIN, DATMAX, NBIN, PGFLAG)
  1225.       INTEGER N
  1226.       REAL    DATA(*)
  1227.       REAL    DATMIN, DATMAX
  1228.       INTEGER NBIN, PGFLAG
  1229.  
  1230. Draw a histogram of N values of a variable in array
  1231. DATA(1...N) in the range DATMIN to DATMAX using NBIN bins.  Note
  1232. that array elements which fall exactly on the boundary between
  1233. two bins will be counted in the higher bin rather than the
  1234. lower one; and array elements whose value is less than DATMIN or
  1235. greater than or equal to DATMAX will not be counted at all.
  1236.  
  1237. Arguments:
  1238.  N      (input)  : the number of data values.
  1239.  DATA   (input)  : the data values. Note: the dimension of array
  1240.                    DATA must be greater than or equal to N. The
  1241.                    first N elements of the array are used.
  1242.  DATMIN (input)  : the minimum data value for the histogram.
  1243.  DATMAX (input)  : the maximum data value for the histogram.
  1244.  NBIN   (input)  : the number of bins to use: the range DATMIN to
  1245.                    DATMAX is divided into NBIN equal bins and
  1246.                    the number of DATA values in each bin is
  1247.                    determined by PGHIST.  NBIN may not exceed 200.
  1248.  PGFLAG (input)  : if PGFLAG = 1, the histogram is plotted in the
  1249.                    current window and viewport; if PGFLAG = 0,
  1250.                    PGENV is called automatically by PGHIST to start
  1251.                    a new plot (the x-limits of the window will be
  1252.                    DATMIN and DATMAX; the y-limits will be chosen
  1253.                    automatically.
  1254.                    IF PGFLAG = 2,3 the histogram will be in the same
  1255.                    window and viewport but with a filled area style.
  1256.                    If pgflag=4,5 as for pgflag = 0,1, but simple
  1257.                    line drawn as for PGBIN
  1258.  
  1259.  
  1260.  
  1261. ------------------------------------------------------------------------
  1262. Module: PGIDEN -- write username, date, and time at bottom of plot
  1263. ------------------------------------------------------------------------
  1264.  
  1265.       SUBROUTINE PGIDEN
  1266.  
  1267. Write username, date, and time at bottom of plot.
  1268.  
  1269. Arguments: none.
  1270.  
  1271.  
  1272. ------------------------------------------------------------------------
  1273. Module: PGIMAG -- color image from a 2D data array
  1274. ------------------------------------------------------------------------
  1275.  
  1276.       SUBROUTINE PGIMAG (A, IDIM, JDIM, I1, I2, J1, J2,
  1277.      1                   A1, A2, TR)
  1278.       INTEGER IDIM, JDIM, I1, I2, J1, J2
  1279.       REAL    A(IDIM,JDIM), A1, A2, TR(6)
  1280.  
  1281. Draw a color image of an array in current window. The subsection
  1282. of the array A defined by indices (I1:I2, J1:J2) is mapped onto
  1283. the view surface world-coordinate system by the transformation
  1284. matrix TR. The resulting quadrilateral region is clipped at the edge
  1285. of the window. Each element of the array is represented in the image
  1286. by a small quadrilateral, which is filled with a color specified by
  1287. the corresponding array value.
  1288.  
  1289. The subroutine uses color indices in the range C1 to C2, which can
  1290. be specified by calling PGSCIR before PGIMAG. The default values
  1291. for C1 and C2 are device-dependent; these values can be determined by
  1292. calling PGQCIR. Note that color representations should be assigned to
  1293. color indices C1 to C2 by calling PGSCR before calling PGIMAG. On some
  1294. devices (but not all), the color representation can be changed after
  1295. the call to PGIMAG by calling PGSCR again.
  1296.  
  1297. Array values in the range A1 to A2 are mapped on to the range of
  1298. color indices C1 to C2, with array values <= A1 being given color
  1299. index C1 and values >= A2 being given color index C2. The mapping
  1300. function for intermediate array values can be specified by
  1301. calling routine PGSITF before PGIMAG; the default is linear.
  1302.  
  1303. On devices which have no available color indices (C1 > C2),
  1304. PGIMAG will return without doing anything. On devices with only
  1305. one color index (C1=C2), all array values map to the same color
  1306. which is rather uninteresting. An image is always "opaque",
  1307. i.e., it obscures all graphical elements previously drawn in
  1308. the region.
  1309.  
  1310. The transformation matrix TR is used to calculate the world
  1311. coordinates of the center of the "cell" that represents each
  1312. array element. The world coordinates of the center of the cell
  1313. corresponding to array element A(I,J) are given by:
  1314.  
  1315.          X = TR(1) + TR(2)*I + TR(3)*J
  1316.          Y = TR(4) + TR(5)*I + TR(6)*J
  1317.  
  1318. Usually TR(3) and TR(5) are zero -- unless the coordinate
  1319. transformation involves a rotation or shear.  The corners of the
  1320. quadrilateral region that is shaded by PGIMAG are given by
  1321. applying this transformation to (I1-0.5,J1-0.5), (I2+0.5, J2+0.5).
  1322.  
  1323. Arguments:
  1324.  A      (input)  : the array to be plotted.
  1325.  IDIM   (input)  : the first dimension of array A.
  1326.  JDIM   (input)  : the second dimension of array A.
  1327.  I1, I2 (input)  : the inclusive range of the first index
  1328.                    (I) to be plotted.
  1329.  J1, J2 (input)  : the inclusive range of the second
  1330.                    index (J) to be plotted.
  1331.  A1     (input)  : the array value which is to appear with shade C1.
  1332.  A2     (input)  : the array value which is to appear with shade C2.
  1333.  TR     (input)  : transformation matrix between array grid and
  1334.                    world coordinates.
  1335.  
  1336.  
  1337. ------------------------------------------------------------------------
  1338. Module: PGLAB -- write labels for x-axis, y-axis, and top of plot
  1339. ------------------------------------------------------------------------
  1340.  
  1341.       SUBROUTINE PGLAB (XLBL, YLBL, TOPLBL)
  1342.       CHARACTER*(*) XLBL, YLBL, TOPLBL
  1343.  
  1344. Write labels outside the viewport. This routine is a simple
  1345. interface to PGMTXT, which should be used if PGLAB is inadequate.
  1346.  
  1347. Arguments:
  1348.  XLBL   (input) : a label for the x-axis (centered below the
  1349.                   viewport).
  1350.  YLBL   (input) : a label for the y-axis (centered to the left
  1351.                   of the viewport, drawn vertically).
  1352.  TOPLBL (input) : a label for the entire plot (centered above the
  1353.                   viewport).
  1354.  
  1355.  
  1356. ------------------------------------------------------------------------
  1357. Module: PGLCUR -- draw a line using the cursor
  1358. ------------------------------------------------------------------------
  1359.  
  1360.       SUBROUTINE PGLCUR (MAXPT, NPT, X, Y)
  1361.       INTEGER MAXPT, NPT
  1362.       REAL    X(*), Y(*)
  1363.  
  1364. Interactive routine for user to enter a polyline by use of
  1365. the cursor.  Routine allows user to Add and Delete vertices;
  1366. vertices are joined by straight-line segments.
  1367.  
  1368. Arguments:
  1369.  MAXPT  (input)  : maximum number of points that may be accepted.
  1370.  NPT    (in/out) : number of points entered; should be zero on
  1371.                    first call.
  1372.  X      (in/out) : array of x-coordinates (dimension at least MAXPT).
  1373.  Y      (in/out) : array of y-coordinates (dimension at least MAXPT).
  1374.  
  1375. Notes:
  1376.  
  1377. (1) On return from the program, cursor points are returned in
  1378. the order they were entered. Routine may be (re-)called with points
  1379. already defined in X,Y (# in NPT), and they will be plotted
  1380. first, before editing.
  1381.  
  1382. (2) User commands: the user types single-character commands
  1383. after positioning the cursor: the following are accepted:
  1384.   A (Add)    - add point at current cursor location.
  1385.   D (Delete) - delete last-entered point.
  1386.   X (eXit)   - leave subroutine.
  1387.  
  1388.  
  1389. ------------------------------------------------------------------------
  1390. Module: PGLDEV -- list available device types
  1391. ------------------------------------------------------------------------
  1392.  
  1393.       SUBROUTINE PGLDEV
  1394.  
  1395. Writes a list to the terminal of all device types known to the
  1396. current version of PGPLOT.
  1397.  
  1398. Arguments: none.
  1399.  
  1400.  
  1401. ------------------------------------------------------------------------
  1402. Module: PGLEN -- find length of a string in a variety of units
  1403. ------------------------------------------------------------------------
  1404.  
  1405.       SUBROUTINE PGLEN (UNITS, STRING, XL, YL)
  1406.       REAL XL, YL
  1407.       INTEGER UNITS
  1408.       CHARACTER*(*) STRING
  1409.  
  1410. Work out length of a string in x and y directions 
  1411.  
  1412. Input
  1413.  UNITS    :  0 => answer in normalized device coordinates
  1414.              1 => answer in inches
  1415.              2 => answer in mm
  1416.              3 => answer in absolute device coordinates (dots)
  1417.              4 => answer in world coordinates
  1418.              5 => answer as a fraction of the current viewport size
  1419.  
  1420.  STRING   :  String of interest
  1421. Output
  1422.  XL       :  Length of string in x direction
  1423.  YL       :  Length of string in y direction
  1424.  
  1425.  
  1426.  
  1427. ------------------------------------------------------------------------
  1428. Module: PGLINE -- draw a polyline (curve defined by line-segments)
  1429. ------------------------------------------------------------------------
  1430.  
  1431.       SUBROUTINE PGLINE (N, XPTS, YPTS)
  1432.       INTEGER  N
  1433.       REAL     XPTS(*), YPTS(*)
  1434.  
  1435. Primitive routine to draw a Polyline. A polyline is one or more
  1436. connected straight-line segments.  The polyline is drawn using
  1437. the current setting of attributes color-index, line-style, and
  1438. line-width. The polyline is clipped at the edge of the window.
  1439.  
  1440. Arguments:
  1441.  N      (input)  : number of points defining the line; the line
  1442.                    consists of (N-1) straight-line segments.
  1443.                    N should be greater than 1 (if it is 1 or less,
  1444.                    nothing will be drawn).
  1445.  XPTS   (input)  : world x-coordinates of the points.
  1446.  YPTS   (input)  : world y-coordinates of the points.
  1447.  
  1448. The dimension of arrays X and Y must be greater than or equal to N.
  1449. The "pen position" is changed to (X(N),Y(N)) in world coordinates
  1450. (if N > 1).
  1451.  
  1452.  
  1453. ------------------------------------------------------------------------
  1454. Module: PGMOVE -- move pen (change current pen position)
  1455. ------------------------------------------------------------------------
  1456.  
  1457.       SUBROUTINE PGMOVE (X, Y)
  1458.       REAL X, Y
  1459.  
  1460. Primitive routine to move the "pen" to the point with world
  1461. coordinates (X,Y). No line is drawn.
  1462.  
  1463. Arguments:
  1464.  X      (input)  : world x-coordinate of the new pen position.
  1465.  Y      (input)  : world y-coordinate of the new pen position.
  1466.  
  1467.  
  1468. ------------------------------------------------------------------------
  1469. Module: PGMTXT -- write text at position relative to viewport
  1470. ------------------------------------------------------------------------
  1471.  
  1472.       SUBROUTINE PGMTXT (SIDE, DISP, COORD, FJUST, TEXT)
  1473.       CHARACTER*(*) SIDE, TEXT
  1474.       REAL DISP, COORD, FJUST
  1475.  
  1476. Write text at a position specified relative to the viewport (outside
  1477. or inside).  This routine is useful for annotating graphs. It is used
  1478. by routine PGLAB.  The text is written using the current values of
  1479. attributes color-index, line-width, character-height, and
  1480. character-font.
  1481.  
  1482. Arguments:
  1483.  SIDE   (input)  : must include one of the characters 'B', 'L', 'T',
  1484.                    or 'R' signifying the Bottom, Left, Top, or Right
  1485.                    margin of the viewport. If it includes 'LV' or
  1486.                    'RV', the string is written perpendicular to the
  1487.                    frame rather than parallel to it.
  1488.  DISP   (input)  : the displacement of the character string from the
  1489.                    specified edge of the viewport, measured outwards
  1490.                    from the viewport in units of the character
  1491.                    height. Use a negative value to write inside the
  1492.                    viewport, a positive value to write outside.
  1493.  COORD  (input)  : the location of the character string along the
  1494.                    specified edge of the viewport, as a fraction of
  1495.                    the length of the edge.
  1496.  FJUST  (input)  : controls justification of the string parallel to
  1497.                    the specified edge of the viewport. If
  1498.                    FJUST = 0.0, the left-hand end of the string will
  1499.                    be placed at COORD; if JUST = 0.5, the center of
  1500.                    the string will be placed at COORD; if JUST = 1.0,
  1501.                    the right-hand end of the string will be placed at
  1502.                    at COORD. Other values between 0 and 1 give inter-
  1503.                    mediate placing, but they are not very useful.
  1504.  TEXT   (input) :  the text string to be plotted. Trailing spaces are
  1505.                    ignored when justifying the string, but leading
  1506.                    spaces are significant.
  1507.  
  1508.  
  1509.  
  1510. ------------------------------------------------------------------------
  1511. Module: PGNCUR -- mark a set of points using the cursor
  1512. ------------------------------------------------------------------------
  1513.  
  1514.       SUBROUTINE PGNCUR (MAXPT, NPT, X, Y, SYMBOL)
  1515.       INTEGER MAXPT, NPT
  1516.       REAL    X(*), Y(*)
  1517.       INTEGER SYMBOL
  1518.  
  1519. Interactive routine for user to enter data points by use of
  1520. the cursor.  Routine allows user to Add and Delete points.  The
  1521. points are returned in order of increasing x-coordinate, not in the
  1522. order they were entered.
  1523.  
  1524. Arguments:
  1525.  MAXPT  (input)  : maximum number of points that may be accepted.
  1526.  NPT    (in/out) : number of points entered; should be zero on
  1527.                    first call.
  1528.  X      (in/out) : array of x-coordinates.
  1529.  Y      (in/out) : array of y-coordinates.
  1530.  SYMBOL (input)  : code number of symbol to use for marking
  1531.                    entered points (see PGPT).
  1532.  
  1533. Note (1): The dimension of arrays X and Y must be greater than or
  1534. equal to MAXPT.
  1535.  
  1536. Note (2): On return from the program, cursor points are returned in
  1537. increasing order of X. Routine may be (re-)called with points
  1538. already defined in X,Y (number in NPT), and they will be plotted
  1539. first, before editing.
  1540.  
  1541. Note (3): User commands: the user types single-character commands
  1542. after positioning the cursor: the following are accepted:
  1543. A (Add)    - add point at current cursor location.
  1544. D (Delete) - delete nearest point to cursor.
  1545. X (eXit)   - leave subroutine.
  1546.  
  1547.  
  1548. ------------------------------------------------------------------------
  1549. Module: PGNUMB -- convert a number into a plottable character string
  1550. ------------------------------------------------------------------------
  1551.  
  1552.       SUBROUTINE PGNUMB (MM, PP, FORM, STRING, NC)
  1553.       INTEGER MM, PP, FORM
  1554.       CHARACTER*(*) STRING
  1555.       INTEGER NC
  1556.  
  1557. This routine converts a number into a decimal character
  1558. representation. To avoid problems of floating-point roundoff, the
  1559. number must be provided as an integer (MM) multiplied by a power of 10
  1560. (10**PP).  The output string retains only significant digits of MM,
  1561. and will be in either integer format (123), decimal format (0.0123),
  1562. or exponential format (1.23x10**5). Standard escape sequences \u, \d 
  1563. raise the exponent and \x is used for the multiplication sign.
  1564. This routine is used by PGBOX to create numeric labels for a plot.
  1565.  
  1566. Formatting rules:
  1567.   (a) Decimal notation (FORM=1):
  1568.       - Trailing zeros to the right of the decimal sign are
  1569.         omitted
  1570.       - The decimal sign is omitted if there are no digits
  1571.         to the right of it
  1572.       - When the decimal sign is placed before the first digit
  1573.         of the number, a zero is placed before the decimal sign
  1574.       - The decimal sign is a period (.)
  1575.       - No spaces are placed between digits (ie digits are not
  1576.         grouped in threes as they should be)
  1577.       - A leading minus (-) is added if the number is negative
  1578.   (b) Exponential notation (FORM=2):
  1579.       - The exponent is adjusted to put just one (non-zero)
  1580.         digit before the decimal sign
  1581.       - The mantissa is formatted as in (a), unless its value is
  1582.         1 in which case it and the multiplication sign are omitted
  1583.       - If the power of 10 is not zero and the mantissa is not
  1584.         zero, an exponent of the form \x10\u[-]nnn is appended,
  1585.         where \x is a multiplication sign (cross), \u is an escape
  1586.         sequence to raise the exponent, and as many digits nnn
  1587.         are used as needed
  1588.   (c) Automatic choice (FORM=0):
  1589.         Decimal notation is used if the absolute value of the
  1590.         number is less than 10000 or greater than or equal to
  1591.         0.01. Otherwise exponential notation is used.
  1592.  
  1593. Arguments:
  1594.  MM     (input)
  1595.  PP     (input)  : the value to be formatted is MM*10**PP.
  1596.  FORM   (input)  : controls how the number is formatted:
  1597.                    FORM = 0 -- use either decimal or exponential
  1598.                    FORM = 1 -- use decimal notation
  1599.                    FORM = 2 -- use exponential notation
  1600.  STRING (output) : the formatted character string, left justified.
  1601.                    If the length of STRING is insufficient, a single
  1602.                    asterisk is returned, and NC=1.
  1603.  NC     (output) : the number of characters used in STRING:
  1604.                    the string to be printed is STRING(1:NC).
  1605.  
  1606.  
  1607. ------------------------------------------------------------------------
  1608. Module: PGOLIN -- mark a set of points using the cursor
  1609. ------------------------------------------------------------------------
  1610.  
  1611.       SUBROUTINE PGOLIN (MAXPT, NPT, X, Y, SYMBOL)
  1612.       INTEGER MAXPT, NPT
  1613.       REAL    X(*), Y(*)
  1614.       INTEGER SYMBOL
  1615.  
  1616. Interactive routine for user to enter data points by use of
  1617. the cursor.  Routine allows user to Add and Delete points.  The
  1618. points are returned in the order that they were entered (unlike
  1619. PGNCUR).
  1620.  
  1621. Arguments:
  1622.  MAXPT  (input)  : maximum number of points that may be accepted.
  1623.  NPT    (in/out) : number of points entered; should be zero on
  1624.                    first call.
  1625.  X      (in/out) : array of x-coordinates.
  1626.  Y      (in/out) : array of y-coordinates.
  1627.  SYMBOL (input)  : code number of symbol to use for marking
  1628.                    entered points (see PGPT).
  1629.  
  1630. Note (1): The dimension of arrays X and Y must be greater than or
  1631. equal to MAXPT.
  1632.  
  1633. Note (2): On return from the program, cursor points are returned in
  1634. the order they were entered. Routine may be (re-)called with points
  1635. already defined in X,Y (number in NPT), and they will be plotted
  1636. first, before editing.
  1637.  
  1638. Note (3): User commands: the user types single-character commands
  1639. after positioning the cursor: the following are accepted:
  1640. A (Add)    - add point at current cursor location.
  1641. D (Delete) - delete the last point entered.
  1642. X (eXit)   - leave subroutine.
  1643.  
  1644.  
  1645. ------------------------------------------------------------------------
  1646. Module: PGOPEN -- open a graphics device
  1647. ------------------------------------------------------------------------
  1648.  
  1649.       INTEGER FUNCTION PGOPEN (DEVICE)
  1650.       CHARACTER*(*) DEVICE
  1651.  
  1652. Open a graphics device for PGPLOT output. If the device is
  1653. opened successfully, it becomes the selected device to which
  1654. graphics output is directed until another device is selected
  1655. with PGSLCT or the device is closed with PGCLOS.
  1656.  
  1657. The value returned by PGOPEN should be tested to ensure that
  1658. the device was opened successfully, e.g.,
  1659.  
  1660.       ISTAT = PGOPEN('plot.ps/PS')
  1661.       IF (ISTAT .LE. 0 ) STOP
  1662.  
  1663. Note that PGOPEN must be declared INTEGER in the calling program.
  1664.  
  1665. [This routine was added to PGPLOT in Version 5.1.0. Older programs
  1666. use PGBEG instead.]
  1667.  
  1668. Returns:
  1669.  PGOPEN          : returns either a positive value, the
  1670.                    identifier of the graphics device for use with
  1671.                    PGSLCT, or a 0 or negative value indicating an
  1672.                    error. In the event of error a message is
  1673.                    written on the standard error unit.
  1674. Arguments:
  1675.  DEVICE  (input) : the "device specification" for the plot device.
  1676.                    Device specifications are installation dependent,
  1677.                    but usually have the form "device/type" or
  1678.                    "file/type". If this argument is a
  1679.                    question mark ('?'), PGOPEN will prompt the user
  1680.                    to supply a string. If the argument is a blank
  1681.                    string (' '), PGOPEN will use the value of
  1682.                    environment variable PGPLOT_DEV.
  1683.  
  1684.  
  1685. ------------------------------------------------------------------------
  1686. Module: PGPAGE -- advance to new page
  1687. ------------------------------------------------------------------------
  1688.  
  1689.       SUBROUTINE PGPAGE
  1690.  
  1691. Advance plotter to a new page or panel, clearing the screen if
  1692. necessary. If the "prompt state" is ON (see PGASK), confirmation is
  1693. requested from the user before clearing the screen. If the view
  1694. surface has been subdivided into panels with PGBEG or PGSUBP, then
  1695. PGPAGE advances to the next panel, and if the current panel is the
  1696. last on the page, PGPAGE clears the screen or starts a new sheet of
  1697. paper.  PGPAGE does not change the PGPLOT window or the viewport
  1698. (in normalized device coordinates); but note that if the size of the
  1699. view-surface is changed externally (e.g., by a workstation window
  1700. manager) the size of the viewport is chnaged in proportion.
  1701.  
  1702. Arguments: none
  1703.  
  1704.  
  1705. ------------------------------------------------------------------------
  1706. Module: PGPANL -- switch to a different panel on the view surface
  1707. ------------------------------------------------------------------------
  1708.  
  1709.       SUBROUTINE PGPANL(IX, IY)
  1710.       INTEGER IX, IY
  1711.  
  1712. Start plotting in a different panel. If the view surface has been
  1713. divided into panels by PGBEG or PGSUBP, this routine can be used to
  1714. move to a different panel. Note that PGPLOT does not remember what
  1715. viewport and window were in use in each panel; these should be reset
  1716. if necessary after calling PGPANL. Nor does PGPLOT clear the panel:
  1717. call PGERAS after calling PGPANL to do this.
  1718.  
  1719. Arguments:
  1720.  IX     (input)  : the horizontal index of the panel (in the range
  1721.                    1 <= IX <= number of panels in horizontal
  1722.                    direction).
  1723.  IY     (input)  : the vertical index of the panel (in the range
  1724.                    1 <= IY <= number of panels in horizontal
  1725.                    direction).
  1726.  
  1727.  
  1728. ------------------------------------------------------------------------
  1729. Module: PGPAP -- change the size of the view surface 
  1730. ------------------------------------------------------------------------
  1731.  
  1732.       SUBROUTINE PGPAP (WIDTH, ASPECT)
  1733.       REAL WIDTH, ASPECT
  1734.  
  1735. This routine changes the size of the view surface ("paper size") to a
  1736. specified width and aspect ratio (height/width), in so far as this is
  1737. possible on the specific device. It is always possible to obtain a
  1738. view surface smaller than the default size; on some devices (e.g.,
  1739. printers that print on roll or fan-feed paper) it is possible to 
  1740. obtain a view surface larger than the default.
  1741.  
  1742. This routine should be called either immediately after PGBEG or
  1743. immediately before PGPAGE. The new size applies to all subsequent
  1744. images until the next call to PGPAP.
  1745.  
  1746. Arguments:
  1747.  WIDTH  (input)  : the requested width of the view surface in inches;
  1748.                    if WIDTH=0.0, PGPAP will obtain the largest view
  1749.                    surface available consistent with argument ASPECT.
  1750.                    (1 inch = 25.4 mm.)
  1751.  ASPECT (input)  : the aspect ratio (height/width) of the view
  1752.                    surface; e.g., ASPECT=1.0 gives a square view
  1753.                    surface, ASPECT=0.618 gives a horizontal
  1754.                    rectangle, ASPECT=1.618 gives a vertical rectangle.
  1755.  
  1756.  
  1757. ------------------------------------------------------------------------
  1758. Module: PGPIXL -- draw pixels
  1759. ------------------------------------------------------------------------
  1760.  
  1761.       SUBROUTINE PGPIXL (IA, IDIM, JDIM, I1, I2, J1, J2, 
  1762.      1                   X1, X2, Y1, Y2)
  1763.       INTEGER IDIM, JDIM, I1, I2, J1, J2
  1764.       INTEGER IA(IDIM,JDIM)
  1765.       REAL    X1, X2, Y1, Y2
  1766.  
  1767. Draw lots of solid-filled (tiny) rectangles aligned with the
  1768. coordinate axes. Best performance is achieved when output is
  1769. directed to a pixel-oriented device and the rectangles coincide
  1770. with the pixels on the device. In other cases, pixel output is
  1771. emulated.
  1772.  
  1773. The subsection of the array IA defined by indices (I1:I2, J1:J2)
  1774. is mapped onto world-coordinate rectangle defined by X1, X2, Y1
  1775. and Y2. This rectangle is divided into (I2 - I1 + 1) * (J2 - J1 + 1)
  1776. small rectangles. Each of these small rectangles is solid-filled
  1777. with the color index specified by the corresponding element of 
  1778. IA.
  1779.  
  1780. On most devices, the output region is "opaque", i.e., it obscures
  1781. all graphical elements previously drawn in the region. But on
  1782. devices that do not have erase capability, the background shade
  1783. is "transparent" and allows previously-drawn graphics to show
  1784. through.
  1785.  
  1786. Arguments:
  1787.  IA     (input)  : the array to be plotted.
  1788.  IDIM   (input)  : the first dimension of array A.
  1789.  JDIM   (input)  : the second dimension of array A.
  1790.  I1, I2 (input)  : the inclusive range of the first index
  1791.                    (I) to be plotted.
  1792.  J1, J2 (input)  : the inclusive range of the second
  1793.                    index (J) to be plotted.
  1794.  X1, Y1 (input)  : world coordinates of one corner of the output
  1795.                    region
  1796.  X2, Y2 (input)  : world coordinates of the opposite corner of the
  1797.                    output region
  1798.  
  1799.  
  1800. ------------------------------------------------------------------------
  1801. Module: PGPNTS -- draw one or more graph markers, not all the same
  1802. ------------------------------------------------------------------------
  1803.  
  1804.       SUBROUTINE PGPNTS (N, X, Y, SYMBOL, NS)
  1805.       INTEGER N, NS
  1806.       REAL X(*), Y(*)
  1807.       INTEGER SYMBOL(*)
  1808.  
  1809. Draw Graph Markers. Unlike PGPT, this routine can draw a different
  1810. symbol at each point. The markers
  1811. are drawn using the current values of attributes color-index,
  1812. line-width, and character-height (character-font applies if the symbol
  1813. number is >31).  If the point to be marked lies outside the window,
  1814. no marker is drawn.  The "pen position" is changed to
  1815. (XPTS(N),YPTS(N)) in world coordinates (if N > 0).
  1816.  
  1817. Arguments:
  1818.  N      (input)  : number of points to mark.
  1819.  X      (input)  : world x-coordinate of the points.
  1820.  Y      (input)  : world y-coordinate of the points.
  1821.  SYMBOL (input)  : code number of the symbol to be plotted at each
  1822.                    point (see PGPT).
  1823.  NS     (input)  : number of values in the SYMBOL array.  If NS <= N,
  1824.                    then the first NS points are drawn using the value
  1825.                    of SYMBOL(I) at (X(I), Y(I)) and SYMBOL(1) for all
  1826.                    the values of (X(I), Y(I)) where I > NS.
  1827.  
  1828. Note: the dimension of arrays X and Y must be greater than or equal
  1829. to N and the dimension of the array SYMBOL must be greater than or
  1830. equal to NS.  If N is 1, X and Y may be scalars (constants or
  1831. variables).  If NS is 1, then SYMBOL may be a scalar.  If N is
  1832. less than 1, nothing is drawn.
  1833.  
  1834.  
  1835. ------------------------------------------------------------------------
  1836. Module: PGPOLY -- fill a polygonal area with shading
  1837. ------------------------------------------------------------------------
  1838.  
  1839.       SUBROUTINE PGPOLY (N, XPTS, YPTS)
  1840.       INTEGER N
  1841.       REAL XPTS(*), YPTS(*)
  1842.  
  1843. Fill-area primitive routine: shade the interior of a closed
  1844. polygon in the current window.  The action of this routine depends
  1845. on the setting of the Fill-Area Style attribute (see PGSFS).
  1846. The polygon is clipped at the edge of the
  1847. window. The pen position is changed to (XPTS(1),YPTS(1)) in world
  1848. coordinates (if N > 1).  If the polygon is not convex, a point is
  1849. assumed to lie inside the polygon if a straight line drawn to
  1850. infinity intersects and odd number of the polygon's edges.
  1851.  
  1852. Arguments:
  1853.  N      (input)  : number of points defining the polygon; the
  1854.                    line consists of N straight-line segments,
  1855.                    joining points 1 to 2, 2 to 3,... N-1 to N, N to 1.
  1856.                    N should be greater than 2 (if it is 2 or less,
  1857.                    nothing will be drawn).
  1858.  XPTS   (input)  : world x-coordinates of the vertices.
  1859.  YPTS   (input)  : world y-coordinates of the vertices.
  1860.                    Note: the dimension of arrays XPTS and YPTS must be
  1861.                    greater than or equal to N.
  1862.  
  1863.  
  1864. ------------------------------------------------------------------------
  1865. Module: PGPT -- draw one or more graph markers
  1866. ------------------------------------------------------------------------
  1867.  
  1868.       SUBROUTINE PGPT (N, XPTS, YPTS, SYMBOL)
  1869.       INTEGER N
  1870.       REAL XPTS(*), YPTS(*)
  1871.       INTEGER SYMBOL
  1872.  
  1873. Primitive routine to draw Graph Markers (polymarker). The markers
  1874. are drawn using the current values of attributes color-index,
  1875. line-width, and character-height (character-font applies if the symbol
  1876. number is >31).  If the point to be marked lies outside the window,
  1877. no marker is drawn.  The "pen position" is changed to
  1878. (XPTS(N),YPTS(N)) in world coordinates (if N > 0).
  1879.  
  1880. Arguments:
  1881.  N      (input)  : number of points to mark.
  1882.  XPTS   (input)  : world x-coordinates of the points.
  1883.  YPTS   (input)  : world y-coordinates of the points.
  1884.  SYMBOL (input)  : code number of the symbol to be drawn at each 
  1885.                    point:
  1886.                    -1, -2  : a single dot (diameter = current
  1887.                              line width).
  1888.                    -3..-31 : a regular polygon with ABS(SYMBOL)
  1889.                              edges (style set by current fill style).
  1890.                    0..31   : standard marker symbols.
  1891.                    32..127 : ASCII characters (in current font).
  1892.                              e.g. to use letter F as a marker, let
  1893.                              SYMBOL = ICHAR('F'). 
  1894.                    > 127  :  a Hershey symbol number.
  1895.  
  1896. Note: the dimension of arrays X and Y must be greater than or equal
  1897. to N. If N is 1, X and Y may be scalars (constants or variables). If
  1898. N is less than 1, nothing is drawn.
  1899.  
  1900.  
  1901. ------------------------------------------------------------------------
  1902. Module: PGPTXT -- write text at arbitrary position and angle
  1903. ------------------------------------------------------------------------
  1904.  
  1905.       SUBROUTINE PGPTXT (X, Y, ANGLE, FJUST, TEXT)
  1906.       REAL X, Y, ANGLE, FJUST
  1907.       CHARACTER*(*) TEXT
  1908.  
  1909. Primitive routine for drawing text. The text may be drawn at any
  1910. angle with the horizontal, and may be centered or left- or right-
  1911. justified at a specified position.  Routine PGTEXT provides a
  1912. simple interface to PGPTXT for horizontal strings. Text is drawn
  1913. using the current values of attributes color-index, line-width,
  1914. character-height, and character-font.  Text is NOT subject to
  1915. clipping at the edge of the window.
  1916.  
  1917. Arguments:
  1918.  X      (input)  : world x-coordinate.
  1919.  Y      (input)  : world y-coordinate. The string is drawn with the
  1920.                    baseline of all the characters passing through
  1921.                    point (X,Y); the positioning of the string along
  1922.                    this line is controlled by argument FJUST.
  1923.  ANGLE  (input)  : angle, in degrees, that the baseline is to make
  1924.                    with the horizontal, increasing counter-clockwise
  1925.                    (0.0 is horizontal).
  1926.  FJUST  (input)  : controls horizontal justification of the string.
  1927.                    If FJUST = 0.0, the string will be left-justified
  1928.                    at the point (X,Y); if FJUST = 0.5, it will be
  1929.                    centered, and if FJUST = 1.0, it will be right
  1930.                    justified. [Other values of FJUST give other
  1931.                    justifications.]
  1932.  TEXT   (input)  : the character string to be plotted.
  1933.  
  1934.  
  1935. ------------------------------------------------------------------------
  1936. Module: PGQAH -- inquire arrow-head style
  1937. ------------------------------------------------------------------------
  1938.  
  1939.       SUBROUTINE PGQAH (FS, ANGLE, VENT)
  1940.       INTEGER  FS
  1941.       REAL ANGLE, VENT
  1942.  
  1943. Query the style to be used for arrowheads drawn with routine PGARRO.
  1944.  
  1945. Argument:
  1946.  FS     (output) : FS = 1 => filled; FS = 2 => outline.
  1947.  ANGLE  (output) : the acute angle of the arrow point, in degrees.
  1948.  VENT   (output) : the fraction of the triangular arrow-head that
  1949.                    is cut away from the back. 
  1950.  
  1951.  
  1952. ------------------------------------------------------------------------
  1953. Module: PGQCF -- inquire character font
  1954. ------------------------------------------------------------------------
  1955.  
  1956.       SUBROUTINE PGQCF (FONT)
  1957.       INTEGER  FONT
  1958.  
  1959. Query the current Character Font (set by routine PGSCF).
  1960.  
  1961. Argument:
  1962.  FONT   (output)   : the current font number (in range 1-4).
  1963.  
  1964.  
  1965. ------------------------------------------------------------------------
  1966. Module: PGQCH -- inquire character height
  1967. ------------------------------------------------------------------------
  1968.  
  1969.       SUBROUTINE PGQCH (SIZE)
  1970.       REAL SIZE
  1971.  
  1972. Query the Character Size attribute (set by routine PGSCH).
  1973.  
  1974. Argument:
  1975.  SIZE   (output) : current character size (dimensionless multiple of
  1976.                    the default size).
  1977.  
  1978.  
  1979. ------------------------------------------------------------------------
  1980. Module: PGQCI -- inquire color index
  1981. ------------------------------------------------------------------------
  1982.  
  1983.       SUBROUTINE PGQCI (CI)
  1984.       INTEGER  CI
  1985.  
  1986. Query the Color Index attribute (set by routine PGSCI).
  1987.  
  1988. Argument:
  1989.  CI     (output) : the current color index (in range 0-max). This is
  1990.                    the color index actually in use, and may differ
  1991.                    from the color index last requested by PGSCI if
  1992.                    that index is not available on the output device.
  1993.  
  1994.  
  1995. ------------------------------------------------------------------------
  1996. Module: PGQCIR -- inquire color index range
  1997. ------------------------------------------------------------------------
  1998.  
  1999.       SUBROUTINE PGQCIR(ICILO, ICIHI)
  2000.       INTEGER   ICILO, ICIHI
  2001.  
  2002. Query the color index range to be used for producing images with
  2003. PGGRAY or PGIMAG, as set by routine PGSCIR or by device default.
  2004.  
  2005. Arguments:
  2006.  ICILO  (output) : the lowest color index to use for images
  2007.  ICIHI  (output) : the highest color index to use for images
  2008.  
  2009.  
  2010. ------------------------------------------------------------------------
  2011. Module: PGQCOL -- inquire color capability
  2012. ------------------------------------------------------------------------
  2013.  
  2014.       SUBROUTINE PGQCOL (CI1, CI2)
  2015.       INTEGER  CI1, CI2
  2016.  
  2017. Query the range of color indices available on the current device.
  2018.  
  2019. Argument:
  2020.  CI1    (output) : the minimum available color index. This will be
  2021.                    either 0 if the device can write in the
  2022.                    background color, or 1 if not.
  2023.  CI2    (output) : the maximum available color index. This will be
  2024.                    1 if the device has no color capability, or a
  2025.                    larger number (e.g., 3, 7, 15, 255).
  2026.  
  2027.  
  2028. ------------------------------------------------------------------------
  2029. Module: PGQCR  -- inquire color representation
  2030. ------------------------------------------------------------------------
  2031.  
  2032.       SUBROUTINE PGQCR (CI, CR, CG, CB)
  2033.       INTEGER CI
  2034.       REAL    CR, CG, CB
  2035.  
  2036. Query the RGB colors associated with a color index.
  2037.  
  2038. Arguments:
  2039.  CI  (input)  : color index
  2040.  CR  (output) : red, green and blue intensities
  2041.  CG  (output)   in the range 0.0 to 1.0
  2042.  CB  (output)
  2043.  
  2044.  
  2045. ------------------------------------------------------------------------
  2046. Module: PGQCS  -- inquire character height in a variety of units
  2047. ------------------------------------------------------------------------
  2048.  
  2049.       SUBROUTINE PGQCS(UNITS, XCH, YCH)
  2050.       INTEGER UNITS
  2051.       REAL XCH, YCH
  2052.  
  2053. Return the current PGPLOT character height in a variety of units.
  2054. This routine provides facilities that are not available via PGQCH.
  2055. Use PGQCS if the character height is required in units other than
  2056. those used in PGSCH.
  2057.  
  2058. The PGPLOT "character height" is a dimension that scales with the
  2059. size of the view surface and with the scale-factor specified with
  2060. routine PGSCH. The default value is 1/40th of the height or width
  2061. of the view surface (whichever is less); this value is then
  2062. multiplied by the scale-factor supplied with PGSCH. Note that it
  2063. is a nominal height only; the actual character size depends on the
  2064. font and is usually somewhat smaller.
  2065.  
  2066. Arguments:
  2067.  UNITS  (input)  : Used to specify the units of the output value:
  2068.                    UNITS = 0 : normalized device coordinates
  2069.                    UNITS = 1 : inches
  2070.                    UNITS = 2 : millimeters
  2071.                    UNITS = 3 : pixels
  2072.                    UNITS = 4 : world coordinates
  2073.                    Other values give an error message, and are
  2074.                    treated as 0.
  2075.  XCH    (output) : The character height for text written with a
  2076.                    vertical baseline.
  2077.  YCH    (output) : The character height for text written with
  2078.                    a horizontal baseline (the usual case).
  2079.  
  2080. The character height is returned in both XCH and YCH.
  2081.  
  2082. If UNITS=1 or UNITS=2, XCH and YCH both receive the same value.
  2083.  
  2084. If UNITS=3, XCH receives the height in horizontal pixel units, and YCH
  2085. receives the height in vertical pixel units; on devices for which the
  2086. pixels are not square, XCH and YCH will be different.
  2087.  
  2088. If UNITS=4, XCH receives the height in horizontal world coordinates
  2089. (as used for the x-axis), and YCH receives the height in vertical
  2090. world coordinates (as used for the y-axis). Unless special care has
  2091. been taken to achive equal world-coordinate scales on both axes, the
  2092. values of XCH and YCH will be different.
  2093.  
  2094. If UNITS=0, XCH receives the character height as a fraction of the
  2095. horizontal dimension of the view surface, and YCH receives the
  2096. character height as a fraction of the vertical dimension of the view
  2097. surface.
  2098.  
  2099.  
  2100. ------------------------------------------------------------------------
  2101. Module: PGQFS -- inquire fill-area style
  2102. ------------------------------------------------------------------------
  2103.  
  2104.       SUBROUTINE PGQFS (FS)
  2105.       INTEGER  FS
  2106.  
  2107. Query the current Fill-Area Style attribute (set by routine
  2108. PGSFS).
  2109.  
  2110. Argument:
  2111.  FS     (output) : the current fill-area style:
  2112.                      FS = 1 => solid (default)
  2113.                      FS = 2 => outline
  2114.                      FS = 3 => hatched
  2115.                      FS = 4 => cross-hatched
  2116.  
  2117.  
  2118. ------------------------------------------------------------------------
  2119. Module: PGQHS -- inquire hatching style
  2120. ------------------------------------------------------------------------
  2121.  
  2122.       SUBROUTINE PGQHS (ANGLE, SEPN, PHASE)
  2123.       REAL ANGLE, SEPN, PHASE
  2124.  
  2125. Query the style to be used hatching (fill area with fill-style 3).
  2126.  
  2127. Arguments:
  2128.  ANGLE  (output) : the angle the hatch lines make with the
  2129.                    horizontal, in degrees, increasing 
  2130.                    counterclockwise (this is an angle on the
  2131.                    view surface, not in world-coordinate space).
  2132.  SEPN   (output) : the spacing of the hatch lines. The unit spacing
  2133.                    is 1 percent of the smaller of the height or
  2134.                    width of the view surface.
  2135.  PHASE  (output) : a real number between 0 and 1; the hatch lines
  2136.                    are displaced by this fraction of SEPN from a
  2137.                    fixed reference.  Adjacent regions hatched with the
  2138.                    same PHASE have contiguous hatch lines.
  2139.  
  2140.  
  2141. ------------------------------------------------------------------------
  2142. Module: PGQID -- inquire current device identifier
  2143. ------------------------------------------------------------------------
  2144.  
  2145.       SUBROUTINE PGQID (ID)
  2146.       INTEGER  ID
  2147.  
  2148. This subroutine returns the identifier of the currently
  2149. selected device, or 0 if no device is selected.  The identifier is
  2150. assigned when PGOPEN is called to open the device, and may be used
  2151. as an argument to PGSLCT.  Each open device has a different
  2152. identifier.
  2153.  
  2154. [This routine was added to PGPLOT in Version 5.1.0.]
  2155.  
  2156. Argument:
  2157.  ID     (output) : the identifier of the current device, or 0 if
  2158.                    no device is currently selected.
  2159.  
  2160.  
  2161. ------------------------------------------------------------------------
  2162. Module: PGQINF -- inquire PGPLOT general information
  2163. ------------------------------------------------------------------------
  2164.  
  2165.       SUBROUTINE PGQINF (ITEM, VALUE, LENGTH)
  2166.       CHARACTER*(*) ITEM, VALUE
  2167.       INTEGER LENGTH
  2168.  
  2169. This routine can be used to obtain miscellaneous information about
  2170. the PGPLOT environment. Input is a character string defining the
  2171. information required, and output is a character string containing the
  2172. requested information.
  2173.  
  2174. The following item codes are accepted (note that the strings must
  2175. match exactly, except for case, but only the first 8 characters are
  2176. significant). For items marked *, PGPLOT must be in the OPEN state
  2177. for the inquiry to succeed. If the inquiry is unsuccessful, either
  2178. because the item code is not recognized or because the information
  2179. is not available, a question mark ('?') is returned.
  2180.  
  2181.   'VERSION'     - version of PGPLOT software in use.
  2182.   'STATE'       - status of PGPLOT ('OPEN' if a graphics device
  2183.                   is open for output, 'CLOSED' otherwise).
  2184.   'USER'        - the username associated with the calling program.
  2185.   'NOW'         - current date and time (e.g., '17-FEB-1986 10:04').
  2186.   'DEVICE'    * - current PGPLOT device or file.
  2187.   'FILE'      * - current PGPLOT device or file.
  2188.   'TYPE'      * - device-type of the current PGPLOT device.
  2189.   'DEV/TYPE'  * - current PGPLOT device and type, in a form which
  2190.                   is acceptable as an argument for PGBEG.
  2191.   'HARDCOPY'  * - is the current device a hardcopy device? ('YES' or
  2192.                   'NO').
  2193.   'TERMINAL'  * - is the current device the user's interactive
  2194.                   terminal? ('YES' or 'NO').
  2195.   'CURSOR'    * - does the current device have a graphics cursor?
  2196.                   ('YES' or 'NO').
  2197.  
  2198. Arguments:
  2199.  ITEM  (input)  : character string defining the information to
  2200.                   be returned; see above for a list of possible
  2201.                   values.
  2202.  VALUE (output) : returns a character-string containing the
  2203.                   requested information, truncated to the length 
  2204.                   of the supplied string or padded on the right with 
  2205.                   spaces if necessary.
  2206.  LENGTH (output): the number of characters returned in VALUE
  2207.                   (excluding trailing blanks).
  2208.  
  2209.  
  2210. ------------------------------------------------------------------------
  2211. Module: PGQITF -- inquire image transfer function
  2212. ------------------------------------------------------------------------
  2213.  
  2214.       SUBROUTINE PGQITF (ITF)
  2215.       INTEGER  ITF
  2216.  
  2217. Return the Image Transfer Function as set by default or by a previous
  2218. call to PGSITF. The Image Transfer Function is used by routines
  2219. PGIMAG, PGGRAY, and PGWEDG.
  2220.  
  2221. Argument:
  2222.  ITF    (output) : type of transfer function (see PGSITF)
  2223.  
  2224.  
  2225. ------------------------------------------------------------------------
  2226. Module: PGQLS -- inquire line style
  2227. ------------------------------------------------------------------------
  2228.  
  2229.       SUBROUTINE PGQLS (LS)
  2230.       INTEGER  LS
  2231.  
  2232. Query the current Line Style attribute (set by routine PGSLS).
  2233.  
  2234. Argument:
  2235.  LS     (output) : the current line-style attribute (in range 1-5).
  2236.  
  2237.  
  2238. ------------------------------------------------------------------------
  2239. Module: PGQLW -- inquire line width
  2240. ------------------------------------------------------------------------
  2241.  
  2242.       SUBROUTINE PGQLW (LW)
  2243.       INTEGER  LW
  2244.  
  2245. Query the current Line-Width attribute (set by routine PGSLW).
  2246.  
  2247. Argument:
  2248.  LW     (output)  : the line-width (in range 1-201).
  2249.  
  2250.  
  2251. ------------------------------------------------------------------------
  2252. Module: PGQPOS -- inquire current pen position
  2253. ------------------------------------------------------------------------
  2254.  
  2255.       SUBROUTINE PGQPOS (X, Y)
  2256.       REAL X, Y
  2257.  
  2258. Query the current "pen" position in world C coordinates (X,Y).
  2259.  
  2260. Arguments:
  2261.  X      (output)  : world x-coordinate of the pen position.
  2262.  Y      (output)  : world y-coordinate of the pen position.
  2263.  
  2264.  
  2265. ------------------------------------------------------------------------
  2266. Module: PGQTBG -- inquire text background color index
  2267. ------------------------------------------------------------------------
  2268.  
  2269.       SUBROUTINE PGQTBG (TBCI)
  2270.       INTEGER  TBCI
  2271.  
  2272. Query the current Text Background Color Index (set by routine
  2273. PGSTBG).
  2274.  
  2275. Argument:
  2276.  TBCI   (output) : receives the current text background color index.
  2277.  
  2278.  
  2279. ------------------------------------------------------------------------
  2280. Module: PGQTXT -- find bounding box of text string
  2281. ------------------------------------------------------------------------
  2282.  
  2283.       SUBROUTINE PGQTXT (X, Y, ANGLE, FJUST, TEXT, XBOX, YBOX)
  2284.       REAL X, Y, ANGLE, FJUST
  2285.       CHARACTER*(*) TEXT
  2286.       REAL XBOX(4), YBOX(4)
  2287.  
  2288. This routine returns a bounding box for a text string. Instead
  2289. of drawing the string as routine PGPTXT does, it returns in XBOX
  2290. and YBOX the coordinates of the corners of a rectangle parallel
  2291. to the string baseline that just encloses the string.
  2292.  
  2293. If the string is blank or contains no drwable characters, all
  2294. four elements of XBOX and YBOX are assigned the starting point
  2295. of the string, (X,Y).
  2296.  
  2297. Arguments:
  2298.  X, Y, ANGLE, FJUST, TEXT (input) : these arguments are the same as
  2299.                    the corrresponding arguments in PGPTXT.
  2300.  XBOX, YBOX (output) : arrays of dimension 4; on output, they
  2301.                    contain the world coordinates of the bounding
  2302.                    box in (XBOX(1), YBOX(1)), ..., (XBOX(4), YBOX(4)).
  2303.  
  2304.  
  2305. ------------------------------------------------------------------------
  2306. Module: PGQVP -- inquire viewport size and position
  2307. ------------------------------------------------------------------------
  2308.  
  2309.       SUBROUTINE PGQVP (UNITS, X1, X2, Y1, Y2)
  2310.       INTEGER UNITS
  2311.       REAL    X1, X2, Y1, Y2
  2312.  
  2313. Inquiry routine to determine the current viewport setting.
  2314. The values returned may be normalized device coordinates, inches, mm,
  2315. or pixels, depending on the value of the input parameter CFLAG.
  2316.  
  2317. Arguments:
  2318.  UNITS  (input)  : used to specify the units of the output parameters:
  2319.                    UNITS = 0 : normalized device coordinates
  2320.                    UNITS = 1 : inches
  2321.                    UNITS = 2 : millimeters
  2322.                    UNITS = 3 : pixels
  2323.                    Other values give an error message, and are
  2324.                    treated as 0.
  2325.  X1     (output) : the x-coordinate of the bottom left corner of the
  2326.                    viewport.
  2327.  X2     (output) : the x-coordinate of the top right corner of the
  2328.                    viewport.
  2329.  Y1     (output) : the y-coordinate of the bottom left corner of the
  2330.                    viewport.
  2331.  Y2     (output) : the y-coordinate of the top right corner of the
  2332.                    viewport.
  2333.  
  2334.  
  2335. ------------------------------------------------------------------------
  2336. Module: PGQVSZ -- find the window defined by the full view surface
  2337. ------------------------------------------------------------------------
  2338.  
  2339.       SUBROUTINE PGQVSZ (UNITS, X1, X2, Y1, Y2)
  2340.       INTEGER UNITS
  2341.       REAL X1, X2, Y1, Y2
  2342.  
  2343. Return the window, in a variety of units, defined by the full
  2344. device view surface (0 -> 1 in normalized device coordinates).
  2345.  
  2346. Input:
  2347.   UNITS    0,1,2,3 for output in normalized device coords, 
  2348.            inches, mm, or absolute device units (dots)
  2349. Output
  2350.   X1,X2    X window
  2351.   Y1,Y2    Y window
  2352.  
  2353.  
  2354.  
  2355. ------------------------------------------------------------------------
  2356. Module: PGQWIN -- inquire window boundary coordinates
  2357. ------------------------------------------------------------------------
  2358.  
  2359.       SUBROUTINE PGQWIN (X1, X2, Y1, Y2)
  2360.       REAL X1, X2, Y1, Y2
  2361.  
  2362. Inquiry routine to determine the current window setting.
  2363. The values returned are world coordinates.
  2364.  
  2365. Arguments:
  2366.  X1     (output) : the x-coordinate of the bottom left corner
  2367.                    of the window.
  2368.  X2     (output) : the x-coordinate of the top right corner
  2369.                    of the window.
  2370.  Y1     (output) : the y-coordinate of the bottom left corner
  2371.                    of the window.
  2372.  Y2     (output) : the y-coordinate of the top right corner
  2373.                    of the window.
  2374.  
  2375.  
  2376. ------------------------------------------------------------------------
  2377. Module: PGRECT -- draw a rectangle, using fill-area attributes
  2378. ------------------------------------------------------------------------
  2379.  
  2380.       SUBROUTINE PGRECT (X1, X2, Y1, Y2)
  2381.       REAL X1, X2, Y1, Y2
  2382.  
  2383. This routine can be used instead of PGPOLY for the special case of
  2384. drawing a rectangle aligned with the coordinate axes; only two
  2385. vertices need be specified instead of four.  On most devices, it is
  2386. faster to use PGRECT than PGPOLY for drawing rectangles.  The
  2387. rectangle has vertices at (X1,Y1), (X1,Y2), (X2,Y2), and (X2,Y1).
  2388.  
  2389. Arguments:
  2390.  X1, X2 (input) : the horizontal range of the rectangle.
  2391.  Y1, Y2 (input) : the vertical range of the rectangle.
  2392.  
  2393.  
  2394. ------------------------------------------------------------------------
  2395. Module: PGRND -- find the smallest `round' number greater than x
  2396. ------------------------------------------------------------------------
  2397.  
  2398.       REAL FUNCTION PGRND (X, NSUB)
  2399.       REAL X
  2400.       INTEGER NSUB
  2401.  
  2402. Routine to find the smallest "round" number larger than x, a
  2403. "round" number being 1, 2 or 5 times a power of 10. If X is negative,
  2404. PGRND(X) = -PGRND(ABS(X)). eg PGRND(8.7) = 10.0,
  2405. PGRND(-0.4) = -0.5.  If X is zero, the value returned is zero.
  2406. This routine is used by PGBOX for choosing  tick intervals.
  2407.  
  2408. Returns:
  2409.  PGRND         : the "round" number.
  2410. Arguments:
  2411.  X      (input)  : the number to be rounded.
  2412.  NSUB   (output) : a suitable number of subdivisions for
  2413.                    subdividing the "nice" number: 2 or 5.
  2414.  
  2415.  
  2416. ------------------------------------------------------------------------
  2417. Module: PGRNGE -- choose axis limits
  2418. ------------------------------------------------------------------------
  2419.  
  2420.       SUBROUTINE PGRNGE (X1, X2, XLO, XHI)
  2421.       REAL X1, X2, XLO, XHI
  2422.  
  2423. Choose plotting limits XLO and XHI which encompass the data
  2424. range X1 to X2.
  2425.  
  2426. Arguments:
  2427.  X1, X2 (input)  : the data range (X1<X2), ie, the min and max values
  2428.                    to be plotted.
  2429.  XLO, XHI (output) : suitable values to use as the extremes of a graph
  2430.                    axis (XLO <= X1, XHI >= X2).
  2431.  
  2432.  
  2433. ------------------------------------------------------------------------
  2434. Module: PGSAH -- set arrow-head style
  2435. ------------------------------------------------------------------------
  2436.  
  2437.       SUBROUTINE PGSAH (FS, ANGLE, VENT)
  2438.       INTEGER  FS
  2439.       REAL ANGLE, VENT
  2440.  
  2441. Set the style to be used for arrowheads drawn with routine PGARRO.
  2442.  
  2443. Argument:
  2444.  FS     (input)  : FS = 1 => filled; FS = 2 => outline.
  2445.                    Other values are treated as 2. Default 1.
  2446.  ANGLE  (input)  : the acute angle of the arrow point, in degrees;
  2447.                    angles in the range 20.0 to 90.0 give reasonable
  2448.                    results. Default 45.0.
  2449.  VENT   (input)  : the fraction of the triangular arrow-head that
  2450.                    is cut away from the back. 0.0 gives a triangular
  2451.                    wedge arrow-head; 1.0 gives an open >. Values 0.3
  2452.                    to 0.7 give reasonable results. Default 0.3.
  2453.  
  2454.  
  2455. ------------------------------------------------------------------------
  2456. Module: PGSAVE -- save PGPLOT attributes
  2457. ------------------------------------------------------------------------
  2458.  
  2459.       SUBROUTINE PGSAVE
  2460.  
  2461. This routine saves the current PGPLOT attributes in a private storage
  2462. area. They can be restored by calling PGUNSA (unsave). Attributes
  2463. saved are: character font, character height, color index, fill-area
  2464. style, line style, line width, pen position, arrow-head style, 
  2465. hatching style. Color representation is not saved.
  2466.  
  2467. Calls to PGSAVE and PGUNSA should always be paired. Up to 20 copies
  2468. of the attributes may be saved. PGUNSA always retrieves the last-saved
  2469. values (first-in first-out stack).
  2470.  
  2471. Arguments: none
  2472.  
  2473.  
  2474. ------------------------------------------------------------------------
  2475. Module: PGUNSA -- restore PGPLOT attributes
  2476. ------------------------------------------------------------------------
  2477.  
  2478.       ENTRY PGUNSA
  2479.  
  2480. This routine restores the PGPLOT attributes saved in the last call to
  2481. PGSAVE. See PGSAVE.
  2482.  
  2483. Arguments: none
  2484.  
  2485.  
  2486. ------------------------------------------------------------------------
  2487. Module: PGSCF -- set character font
  2488. ------------------------------------------------------------------------
  2489.  
  2490.       SUBROUTINE PGSCF (FONT)
  2491.       INTEGER  FONT
  2492.  
  2493. Set the Character Font for subsequent text plotting. Four different
  2494. fonts are available:
  2495.   1: (default) a simple single-stroke font ("normal" font)
  2496.   2: roman font
  2497.   3: italic font
  2498.   4: script font
  2499. This call determines which font is in effect at the beginning of
  2500. each text string. The font can be changed (temporarily) within a text
  2501. string by using the escape sequences \fn, \fr, \fi, and \fs for fonts
  2502. 1, 2, 3, and 4, respectively.
  2503.  
  2504. Argument:
  2505.  FONT   (input)  : the font number to be used for subsequent text
  2506.                    plotting (in range 1-4).
  2507.  
  2508.  
  2509. ------------------------------------------------------------------------
  2510. Module: PGSCH -- set character height
  2511. ------------------------------------------------------------------------
  2512.  
  2513.       SUBROUTINE PGSCH (SIZE)
  2514.       REAL SIZE
  2515.  
  2516. Set the character size attribute. The size affects all text and graph
  2517. markers drawn later in the program. The default character size is
  2518. 1.0, corresponding to a character height about 1/40 the height of
  2519. the view surface.  Changing the character size also scales the length
  2520. of tick marks drawn by PGBOX and terminals drawn by PGERRX and PGERRY.
  2521.  
  2522. Argument:
  2523.  SIZE   (input)  : new character size (dimensionless multiple of
  2524.                    the default size).
  2525.  
  2526.  
  2527. ------------------------------------------------------------------------
  2528. Module: PGSCI -- set color index
  2529. ------------------------------------------------------------------------
  2530.  
  2531.       SUBROUTINE PGSCI (CI)
  2532.       INTEGER  CI
  2533.  
  2534. Set the Color Index for subsequent plotting, if the output device
  2535. permits this. The default color index is 1, usually white on a black
  2536. background for video displays or black on a white background for
  2537. printer plots. The color index is an integer in the range 0 to a
  2538. device-dependent maximum. Color index 0 corresponds to the background
  2539. color; lines may be "erased" by overwriting them with color index 0
  2540. (if the device permits this).
  2541.  
  2542. If the requested color index is not available on the selected device,
  2543. color index 1 will be substituted.
  2544.  
  2545. The assignment of colors to color indices can be changed with
  2546. subroutine PGSCR (set color representation).  Color indices 0-15
  2547. have predefined color representations (see the PGPLOT manual), but
  2548. these may be changed with PGSCR.  Color indices above 15  have no
  2549. predefined representations: if these indices are used, PGSCR must
  2550. be called to define the representation.
  2551.  
  2552. Argument:
  2553.  CI     (input)  : the color index to be used for subsequent plotting
  2554.                    on the current device (in range 0-max). If the
  2555.                    index exceeds the device-dependent maximum, the
  2556.                    default color index (1) is used.
  2557.  
  2558.  
  2559. ------------------------------------------------------------------------
  2560. Module: PGSCIR -- set color index range
  2561. ------------------------------------------------------------------------
  2562.  
  2563.       SUBROUTINE PGSCIR(ICILO, ICIHI)
  2564.       INTEGER   ICILO, ICIHI
  2565.  
  2566. Set the color index range to be used for producing images with
  2567. PGGRAY or PGIMAG. If the range is not all within the range supported
  2568. by the device, a smaller range will be used. The number of
  2569. different colors available for images is ICIHI-ICILO+1.
  2570.  
  2571. Arguments:
  2572.  ICILO  (input)  : the lowest color index to use for images
  2573.  ICIHI  (input)  : the highest color index to use for images
  2574.  
  2575.  
  2576. ------------------------------------------------------------------------
  2577. Module: PGSCR -- set color representation
  2578. ------------------------------------------------------------------------
  2579.  
  2580.       SUBROUTINE PGSCR (CI, CR, CG, CB)
  2581.       INTEGER CI
  2582.       REAL    CR, CG, CB
  2583.  
  2584. Set color representation: i.e., define the color to be
  2585. associated with a color index.  Ignored for devices which do not
  2586. support variable color or intensity.  Color indices 0-15
  2587. have predefined color representations (see the PGPLOT manual), but
  2588. these may be changed with PGSCR.  Color indices 16-maximum have no
  2589. predefined representations: if these indices are used, PGSCR must
  2590. be called to define the representation. On monochrome output
  2591. devices (e.g. VT125 terminals with monochrome monitors), the
  2592. monochrome intensity is computed from the specified Red, Green, Blue
  2593. intensities as 0.30*R + 0.59*G + 0.11*B, as in US color television
  2594. systems, NTSC encoding.  Note that most devices do not have an
  2595. infinite range of colors or monochrome intensities available;
  2596. the nearest available color is used.  Examples: for black,
  2597. set CR=CG=CB=0.0; for white, set CR=CG=CB=1.0; for medium gray,
  2598. set CR=CG=CB=0.5; for medium yellow, set CR=CG=0.5, CB=0.0.
  2599.  
  2600. Argument:
  2601.  CI     (input)  : the color index to be defined, in the range 0-max.
  2602.                    If the color index greater than the device
  2603.                    maximum is specified, the call is ignored. Color
  2604.                    index 0 applies to the background color.
  2605.  CR     (input)  : red, green, and blue intensities,
  2606.  CG     (input)    in range 0.0 to 1.0.
  2607.  CB     (input)
  2608.  
  2609.  
  2610. ------------------------------------------------------------------------
  2611. Module: PGSCRN -- set color representation by name
  2612. ------------------------------------------------------------------------
  2613.  
  2614.       SUBROUTINE PGSCRN(CI, NAME, IER)
  2615.       INTEGER CI
  2616.       CHARACTER*(*) NAME
  2617.       INTEGER IER
  2618.  
  2619. Set color representation: i.e., define the color to be
  2620. associated with a color index.  Ignored for devices which do not
  2621. support variable color or intensity.  This is an alternative to
  2622. routine PGSCR. The color representation is defined by name instead
  2623. of (R,G,B) components.
  2624.  
  2625. Color names are defined in an external file which is read the first
  2626. time that PGSCRN is called. The name of the external file is
  2627. found as follows:
  2628. 1. if environment variable (logical name) PGPLOT_RGB is defined,
  2629.    its value is used as the file name;
  2630. 2. otherwise, if environment variable PGPLOT_DIR is defined, a
  2631.    file "rgb.txt" in the directory named by this environment
  2632.    variable is used;
  2633. 3. otherwise, file "rgb.txt" in the current directory is used.
  2634. If all of these fail to find a file, an error is reported and
  2635. the routine does nothing.
  2636.  
  2637. Each line of the file
  2638. defines one color, with four blank- or tab-separated fields per
  2639. line. The first three fields are the R, G, B components, which
  2640. are integers in the range 0 (zero intensity) to 255 (maximum
  2641. intensity). The fourth field is the color name. The color name
  2642. may include embedded blanks. Example:
  2643.  
  2644. 255   0   0 red
  2645. 255 105 180 hot pink
  2646. 255 255 255 white
  2647.   0   0   0 black
  2648.  
  2649. Arguments:
  2650.  CI     (input)  : the color index to be defined, in the range 0-max.
  2651.                    If the color index greater than the device
  2652.                    maximum is specified, the call is ignored. Color
  2653.                    index 0 applies to the background color.
  2654.  NAME   (input)  : the name of the color to be associated with
  2655.                    this color index. This name must be in the
  2656.                    external file. The names are not case-sensitive.
  2657.                    If the color is not listed in the file, the
  2658.                    color representation is not changed.
  2659.  IER    (output) : returns 0 if the routine was successful, 1
  2660.                    if an error occurred (either the external file
  2661.                    could not be read, or the requested color was
  2662.                    not defined in the file).
  2663.  
  2664.  
  2665. ------------------------------------------------------------------------
  2666. Module: PGSFS -- set fill-area style
  2667. ------------------------------------------------------------------------
  2668.  
  2669.       SUBROUTINE PGSFS (FS)
  2670.       INTEGER  FS
  2671.  
  2672. Set the Fill-Area Style attribute for subsequent area-fill by
  2673. PGPOLY, PGRECT, or PGCIRC.  Four different styles are available: 
  2674. solid (fill polygon with solid color of the current color-index), 
  2675. outline (draw outline of polygon only, using current line attributes),
  2676. hatched (shade interior of polygon with parallel lines, using
  2677. current line attributes), or cross-hatched. The orientation and
  2678. spacing of hatch lines can be specified with routine PGSHS (set
  2679. hatch style).
  2680.  
  2681. Argument:
  2682.  FS     (input)  : the fill-area style to be used for subsequent
  2683.                    plotting:
  2684.                      FS = 1 => solid (default)
  2685.                      FS = 2 => outline
  2686.                      FS = 3 => hatched
  2687.                      FS = 4 => cross-hatched
  2688.                    Other values give an error message and are
  2689.                    treated as 2.
  2690.  
  2691.  
  2692. ------------------------------------------------------------------------
  2693. Module: PGSHLS -- set color representation using HLS system
  2694. ------------------------------------------------------------------------
  2695.  
  2696.       SUBROUTINE PGSHLS (CI, CH, CL, CS)
  2697.       INTEGER CI
  2698.       REAL    CH, CL, CS
  2699.  
  2700. Set color representation: i.e., define the color to be
  2701. associated with a color index.  This routine is equivalent to
  2702. PGSCR, but the color is defined in the Hue-Lightness-Saturation
  2703. model instead of the Red-Green-Blue model. Hue is represented
  2704. by an angle in degrees, with red at 120, green at 240,
  2705. and blue at 0 (or 360). Lightness ranges from 0.0 to 1.0, with black
  2706. at lightness 0.0 and white at lightness 1.0. Saturation ranges from
  2707. 0.0 (gray) to 1.0 (pure color). Hue is irrelevant when saturation
  2708. is 0.0.
  2709.  
  2710. Examples:           H     L     S        R     G     B
  2711.     black          any   0.0   0.0      0.0   0.0   0.0
  2712.     white          any   1.0   0.0      1.0   1.0   1.0
  2713.     medium gray    any   0.5   0.0      0.5   0.5   0.5
  2714.     red            120   0.5   1.0      1.0   0.0   0.0
  2715.     yellow         180   0.5   1.0      1.0   1.0   0.0
  2716.     pink           120   0.7   0.8      0.94  0.46  0.46
  2717.  
  2718. Reference: SIGGRAPH Status Report of the Graphic Standards Planning
  2719. Committee, Computer Graphics, Vol.13, No.3, Association for
  2720. Computing Machinery, New York, NY, 1979. See also: J. D. Foley et al,
  2721. ``Computer Graphics: Principles and Practice'', second edition,
  2722. Addison-Wesley, 1990, section 13.3.5.
  2723.  
  2724. Argument:
  2725.  CI     (input)  : the color index to be defined, in the range 0-max.
  2726.                    If the color index greater than the device
  2727.                    maximum is specified, the call is ignored. Color
  2728.                    index 0 applies to the background color.
  2729.  CH     (input)  : hue, in range 0.0 to 360.0.
  2730.  CL     (input)  : lightness, in range 0.0 to 1.0.
  2731.  CS     (input)  : saturation, in range 0.0 to 1.0.
  2732.  
  2733.  
  2734. ------------------------------------------------------------------------
  2735. Module: PGSHS -- set hatching style
  2736. ------------------------------------------------------------------------
  2737.  
  2738.       SUBROUTINE PGSHS (ANGLE, SEPN, PHASE)
  2739.       REAL ANGLE, SEPN, PHASE
  2740.  
  2741. Set the style to be used for hatching (fill area with fill-style 3).
  2742. The default style is ANGLE=45.0, SEPN=1.0, PHASE=0.0.
  2743.  
  2744. Arguments:
  2745.  ANGLE  (input)  : the angle the hatch lines make with the
  2746.                    horizontal, in degrees, increasing 
  2747.                    counterclockwise (this is an angle on the
  2748.                    view surface, not in world-coordinate space).
  2749.  SEPN   (input)  : the spacing of the hatch lines. The unit spacing
  2750.                    is 1 percent of the smaller of the height or
  2751.                    width of the view surface. This should not be
  2752.                    zero.
  2753.  PHASE  (input)  : a real number between 0 and 1; the hatch lines
  2754.                    are displaced by this fraction of SEPN from a
  2755.                    fixed reference.  Adjacent regions hatched with the
  2756.                    same PHASE have contiguous hatch lines. To hatch
  2757.                    a region with alternating lines of two colors,
  2758.                    fill the area twice, with PHASE=0.0 for one color
  2759.                    and PHASE=0.5 for the other color.
  2760.  
  2761.  
  2762. ------------------------------------------------------------------------
  2763. Module: PGSITF -- set image transfer function
  2764. ------------------------------------------------------------------------
  2765.  
  2766.       SUBROUTINE PGSITF (ITF)
  2767.       INTEGER  ITF
  2768.  
  2769. Set the Image Transfer Function for subsequent images drawn by
  2770. PGIMAG, PGGRAY, or PGWEDG. The Image Transfer Function is used
  2771. to map array values into the available range of color indices
  2772. specified with routine PGSCIR or (for PGGRAY on some devices)
  2773. into dot density.
  2774.  
  2775. Argument:
  2776.  ITF    (input)  : type of transfer function:
  2777.                      ITF = 0 : linear
  2778.                      ITF = 1 : logarithmic
  2779.                      ITF = 2 : square-root
  2780.  
  2781.  
  2782. ------------------------------------------------------------------------
  2783. Module: PGSLCT -- select an open graphics device
  2784. ------------------------------------------------------------------------
  2785.  
  2786.       SUBROUTINE PGSLCT(ID)
  2787.       INTEGER ID
  2788.  
  2789. Select one of the open graphics devices and direct subsequent
  2790. plotting to it. The argument is the device identifier returned by
  2791. PGOPEN when the device was opened. If the supplied argument is not a
  2792. valid identifier of on open graphics device, a warning message is
  2793. issued and the current selection is unchanged.
  2794.  
  2795. [This routine was added to PGPLOT in Version 5.1.0.]
  2796.  
  2797. Arguments:
  2798.  
  2799. ID (input, integer): identifier of the device to be selected.
  2800.  
  2801.  
  2802. ------------------------------------------------------------------------
  2803. Module: PGSLS -- set line style
  2804. ------------------------------------------------------------------------
  2805.  
  2806.       SUBROUTINE PGSLS (LS)
  2807.       INTEGER  LS
  2808.  
  2809. Set the line style attribute for subsequent plotting. This
  2810. attribute affects line primitives only; it does not affect graph
  2811. markers, text, or area fill.
  2812. Five different line styles are available, with the following codes:
  2813. 1 (full line), 2 (dashed), 3 (dot-dash-dot-dash), 4 (dotted),
  2814. 5 (dash-dot-dot-dot). The default is 1 (normal full line).
  2815.  
  2816. Argument:
  2817.  LS     (input)  : the line-style code for subsequent plotting
  2818.                    (in range 1-5).
  2819.  
  2820.  
  2821. ------------------------------------------------------------------------
  2822. Module: PGSLW -- set line width
  2823. ------------------------------------------------------------------------
  2824.  
  2825.       SUBROUTINE PGSLW (LW)
  2826.       INTEGER  LW
  2827.  
  2828. Set the line-width attribute. This attribute affects lines, graph
  2829. markers, and text. The line width is specified in units of 1/200 
  2830. (0.005) inch (about 0.13 mm) and must be an integer in the range
  2831. 1-201. On some devices, thick lines are generated by tracing each
  2832. line with multiple strokes offset in the direction perpendicular to
  2833. the line.
  2834.  
  2835. Argument:
  2836.  LW     (input)  : width of line, in units of 0.005 inch (0.13 mm)
  2837.                    in range 1-201.
  2838.  
  2839.  
  2840. ------------------------------------------------------------------------
  2841. Module: PGSTBG -- set text background color index
  2842. ------------------------------------------------------------------------
  2843.  
  2844.       SUBROUTINE PGSTBG (TBCI)
  2845.       INTEGER  TBCI
  2846.  
  2847. Set the Text Background Color Index for subsequent text. By default
  2848. text does not obscure underlying graphics. If the text background
  2849. color index is positive, however, text is opaque: the bounding box
  2850. of the text is filled with the color specified by PGSTBG before
  2851. drawing the text characters in the current color index set by PGSCI.
  2852. Use color index 0 to erase underlying graphics before drawing text.
  2853.  
  2854. Argument:
  2855.  TBCI   (input)  : the color index to be used for the background
  2856.                    for subsequent text plotting:
  2857.                      TBCI < 0  => transparent (default)
  2858.                      TBCI >= 0 => text will be drawn on an opaque
  2859.                    background with color index TBCI.
  2860.  
  2861.  
  2862. ------------------------------------------------------------------------
  2863. Module: PGSUBP -- subdivide view surface into panels
  2864. ------------------------------------------------------------------------
  2865.  
  2866.       SUBROUTINE PGSUBP (NXSUB, NYSUB)
  2867.       INTEGER NXSUB, NYSUB
  2868.  
  2869. PGPLOT divides the physical surface of the plotting device (screen,
  2870. window, or sheet of paper) into NXSUB x NYSUB `panels'. When the 
  2871. view surface is sub-divided in this way, PGPAGE moves to the next
  2872. panel, not the next physical page. The initial subdivision of the
  2873. view surface is set in the call to PGBEG. When PGSUBP is called,
  2874. it forces the next call to PGPAGE to start a new physical page,
  2875. subdivided in the manner indicated. No plotting should be done
  2876. between a call of PGSUBP and a call of PGPAGE (or PGENV, which calls
  2877. PGPAGE).
  2878.  
  2879. If NXSUB > 0, PGPLOT uses the panels in row order; if <0, 
  2880. PGPLOT uses them in column order, e.g.,
  2881.      
  2882.  NXSUB=3, NYSUB=2            NXSUB=-3, NYSUB=2   
  2883.                                                
  2884. +-----+-----+-----+         +-----+-----+-----+
  2885. |  1  |  2  |  3  |         |  1  |  3  |  5  |
  2886. +-----+-----+-----+         +-----+-----+-----+
  2887. |  4  |  5  |  6  |         |  2  |  4  |  6  |
  2888. +-----+-----+-----+         +-----+-----+-----+
  2889.  
  2890. PGPLOT advances from one panels to the next when PGPAGE is called,
  2891. clearing the screen or starting a new page when the last panel has
  2892. been used. It is also possible to jump from one panel to another
  2893. in random order by calling PGPANL.
  2894.  
  2895. Arguments:
  2896.  NXSUB  (input)  : the number of subdivisions of the view surface in
  2897.                    X (>0 or <0).
  2898.  NYSUB  (input)  : the number of subdivisions of the view surface in
  2899.                    Y (>0).
  2900.  
  2901.  
  2902. ------------------------------------------------------------------------
  2903. Module: PGSVP -- set viewport (normalized device coordinates)
  2904. ------------------------------------------------------------------------
  2905.  
  2906.       SUBROUTINE PGSVP (XLEFT, XRIGHT, YBOT, YTOP)
  2907.       REAL XLEFT, XRIGHT, YBOT, YTOP
  2908.  
  2909. Change the size and position of the viewport, specifying
  2910. the viewport in normalized device coordinates.  Normalized
  2911. device coordinates run from 0 to 1 in each dimension. The
  2912. viewport is the rectangle on the view surface "through"
  2913. which one views the graph.  All the PG routines which plot lines
  2914. etc. plot them within the viewport, and lines are truncated at
  2915. the edge of the viewport (except for axes, labels etc drawn with
  2916. PGBOX or PGLAB).  The region of world space (the coordinate
  2917. space of the graph) which is visible through the viewport is
  2918. specified by a call to PGSWIN.  It is legal to request a
  2919. viewport larger than the view surface; only the part which
  2920. appears on the view surface will be plotted.
  2921.  
  2922. Arguments:
  2923.  XLEFT  (input)  : x-coordinate of left hand edge of viewport, in NDC.
  2924.  XRIGHT (input)  : x-coordinate of right hand edge of viewport,
  2925.                    in NDC.
  2926.  YBOT   (input)  : y-coordinate of bottom edge of viewport, in NDC.
  2927.  YTOP   (input)  : y-coordinate of top  edge of viewport, in NDC.
  2928.  
  2929.  
  2930. ------------------------------------------------------------------------
  2931. Module: PGSWIN -- set window
  2932. ------------------------------------------------------------------------
  2933.  
  2934.       SUBROUTINE PGSWIN (X1, X2, Y1, Y2)
  2935.       REAL X1, X2, Y1, Y2
  2936.  
  2937. Change the window in world coordinate space that is to be mapped on
  2938. to the viewport.  Usually PGSWIN is called automatically by PGENV,
  2939. but it may be called directly by the user.
  2940.  
  2941. Arguments:
  2942.  X1     (input)  : the x-coordinate of the bottom left corner
  2943.                    of the viewport.
  2944.  X2     (input)  : the x-coordinate of the top right corner
  2945.                    of the viewport (note X2 may be less than X1).
  2946.  Y1     (input)  : the y-coordinate of the bottom left corner
  2947.                    of the viewport.
  2948.  Y2     (input)  : the y-coordinate of the top right corner
  2949.                    of the viewport (note Y2 may be less than Y1).
  2950.  
  2951.  
  2952. ------------------------------------------------------------------------
  2953. Module: PGTBOX -- draw frame and write (DD) HH MM SS.S labelling
  2954. ------------------------------------------------------------------------
  2955.  
  2956.       SUBROUTINE PGTBOX (XOPT, XTICK, NXSUB, YOPT, YTICK, NYSUB)
  2957.  
  2958.       REAL XTICK, YTICK
  2959.       INTEGER NXSUB, NYSUB
  2960.       CHARACTER XOPT*(*), YOPT*(*)
  2961.  
  2962. Draw a box and optionally label one or both axes with (DD) HH MM SS 
  2963. style numeric labels (useful for time or RA - DEC plots).   If this 
  2964. style of labelling is desired, then PGSWIN should have been called
  2965. previously with the extrema in SECONDS of time.
  2966.  
  2967. In the seconds field, you can have at most 3 places after the decimal
  2968. point, so that 1 ms is the smallest time interval you can time label.
  2969.  
  2970. Large numbers are coped with by fields of 6 characters long.  Thus 
  2971. you could have times with days or hours as big as 999999.  However, 
  2972. in practice, you might have trouble with labels overwriting  themselves
  2973. with such large numbers unless you a) use a small time INTERVAL, 
  2974. b) use a small character size or c) choose your own sparse ticks in 
  2975. the call to PGTBOX.  
  2976.  
  2977. PGTBOX will attempt, when choosing its own ticks, not to overwrite
  2978. the labels, but this algorithm is not very bright and may fail.
  2979.  
  2980. Note that small intervals but large absolute times such as
  2981. TMIN = 200000.0 s and TMAX=200000.1 s will cause the algorithm
  2982. to fail.  This is inherent in PGPLOT's use of single precision
  2983. and cannot be avoided.  In such cases, you should use relative
  2984. times if possible.
  2985.  
  2986. PGTBOX's labelling philosophy is that the left-most or bottom tick of
  2987. the axis contains a full label.  Thereafter, only changing fields are
  2988. labelled.  Negative fields are given a '-' label, positive fields
  2989. have none.   Axes that have the DD (or HH if the day field is not
  2990. used) field on each major tick carry the sign on each field.  If the
  2991. axis crosses zero, the zero tick will carry a full label and sign.
  2992.  
  2993. This labelling style can cause a little confusion with some special
  2994. cases, but as long as you know its philosophy, the truth can be divined.
  2995. Consider an axis with TMIN=20s, TMAX=-20s.   The labels will look like
  2996.  
  2997.        +----------+----------+----------+----------+
  2998.     0h0m20s      10s      -0h0m0s      10s        20s
  2999.  
  3000. Knowing that the left field always has a full label and that
  3001. positive fields are unsigned, informs that time is decreasing
  3002. from left to right, not vice versa.   This can become very 
  3003. unclear if you have used the 'F' option, but that is your problem !
  3004.  
  3005. Exceptions to this labelling philosophy are when the finest time
  3006. increment being displayed is hours (with option 'Y') or days.  
  3007. Then all fields carry a label.  For example,
  3008.  
  3009.        +----------+----------+----------+----------+
  3010.      -10h        -8h        -6h        -4h        -2h
  3011.  
  3012.  
  3013. PGTBOX can be used in place of PGBOX; it calls PGBOX and only invokes 
  3014. time labelling if requested. Other options are passed intact to PGBOX.
  3015.  
  3016. Inputs:
  3017.  XOPT   :  X-options for PGTBOX.  Same as for PGBOX plus 
  3018.  
  3019.             'Z' for (DD) HH MM SS.S time labelling
  3020.             'Y' means don't include the day field so that labels
  3021.                 are HH MM SS.S rather than DD HH MM SS.S   The hours
  3022.                 will accumulate beyond 24 if necessary in this case.
  3023.             'X' label the HH field as modulo 24.  Thus, a label
  3024.                 such as 25h 10m would come out as 1h 10m
  3025.             'H' means superscript numbers with d, h, m, & s  symbols
  3026.             'D' means superscript numbers with    o, ', & '' symbols 
  3027.             'F' causes the first label (left- or bottom-most) to
  3028.                 be omitted. Useful for sub-panels that abut each other.
  3029.                 Care is needed because first label carries sign as well.
  3030.             'O' means omit leading zeros in numbers < 10
  3031.                 E.g.  3h 3m 1.2s rather than 03h 03m 01.2s  Useful
  3032.                 to help save space on X-axes. The day field does not 
  3033.                 use this facility.
  3034.  
  3035.  YOPT   :  Y-options for PGTBOX.  See above.
  3036.  XTICK  :  X-axis major tick increment.  0.0 for default. 
  3037.  YTICK  :  Y-axis major tick increment.  0.0 for default. 
  3038.            If the 'Z' option is used then XTICK and/or YTICK must
  3039.            be in seconds.
  3040.  NXSUB  :  Number of intervals for minor ticks on X-axis. 0 for default
  3041.  NYSUB  :  Number of intervals for minor ticks on Y-axis. 0 for default
  3042.  
  3043.  The regular XOPT and YOPT axis options for PGBOX are
  3044.  
  3045.  A : draw Axis (X axis is horizontal line Y=0, Y axis is vertical
  3046.      line X=0).
  3047.  B : draw bottom (X) or left (Y) edge of frame.
  3048.  C : draw top (X) or right (Y) edge of frame.
  3049.  G : draw Grid of vertical (X) or horizontal (Y) lines.
  3050.  I : Invert the tick marks; ie draw them outside the viewport
  3051.      instead of inside.
  3052.  L : label axis Logarithmically (see below).
  3053.  N : write Numeric labels in the conventional location below the
  3054.      viewport (X) or to the left of the viewport (Y).
  3055.  P : extend ("Project") major tick marks outside the box (ignored if
  3056.      option I is specified).
  3057.  M : write numeric labels in the unconventional location above the
  3058.      viewport (X) or to the right of the viewport (Y).
  3059.  T : draw major Tick marks at the major coordinate interval.
  3060.  S : draw minor tick marks (Subticks).
  3061.  V : orient numeric labels Vertically. This is only applicable to Y.
  3062.      The default is to write Y-labels parallel to the axis.
  3063.  1 : force decimal labelling, instead of automatic choice (see PGNUMB).
  3064.  2 : force exponential labelling, instead of automatic.
  3065.  
  3066.      The default is to write Y-labels parallel to the axis
  3067.  
  3068.  
  3069.        ******************        EXCEPTIONS       *******************
  3070.  
  3071.        Note that 
  3072.          1) PGBOX option 'L' (log labels) is ignored with option 'Z'
  3073.          2) The 'O' option will be ignored for the 'V' option as it 
  3074.             makes it impossible to align the labels nicely
  3075.          3) Option 'Y' is forced with option 'D'
  3076.  
  3077.        ***************************************************************
  3078.  
  3079.  
  3080.  
  3081.  
  3082. ------------------------------------------------------------------------
  3083. Module: PGTEXT -- write text (horizontal, left-justified)
  3084. ------------------------------------------------------------------------
  3085.  
  3086.       SUBROUTINE PGTEXT (X, Y, TEXT)
  3087.       REAL X, Y
  3088.       CHARACTER*(*) TEXT
  3089.  
  3090. Write text. The bottom left corner of the first character is placed
  3091. at the specified position, and the text is written horizontally.
  3092. This is a simplified interface to the primitive routine PGPTXT.
  3093. For non-horizontal text, use PGPTXT.
  3094.  
  3095. Arguments:
  3096.  X      (input)  : world x-coordinate of start of string.
  3097.  Y      (input)  : world y-coordinate of start of string.
  3098.  TEXT   (input)  : the character string to be plotted.
  3099.  
  3100.  
  3101. ------------------------------------------------------------------------
  3102. Module: PGUPDT -- update display
  3103. ------------------------------------------------------------------------
  3104.  
  3105.       SUBROUTINE PGUPDT
  3106.  
  3107. Update the graphics display: flush any pending commands to the
  3108. output device. This routine empties the buffer created by PGBBUF,
  3109. but it does not alter the PGBBUF/PGEBUF counter. The routine should
  3110. be called when it is essential that the display be completely up to
  3111. date (before interaction with the user, for example) but it is not
  3112. known if output is being buffered.
  3113.  
  3114. Arguments: none
  3115.  
  3116.  
  3117. ------------------------------------------------------------------------
  3118. Module: PGVECT -- vector map of a 2D data array, with blanking
  3119. ------------------------------------------------------------------------
  3120.  
  3121.       SUBROUTINE PGVECT (A, B, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR,
  3122.      1                   BLANK)
  3123.       INTEGER IDIM, JDIM, I1, I2, J1, J2, NC
  3124.       REAL    A(IDIM,JDIM), B(IDIM, JDIM), TR(6), BLANK, C
  3125.  
  3126. Draw a vector map of two arrays.  This routine is similar to
  3127. PGCONB in that array elements that have the "magic value" defined by
  3128. the argument BLANK are ignored, making gaps in the vector map.  The
  3129. routine may be useful for data measured on most but not all of the
  3130. points of a grid. Vectors are displayed as arrows; the style of the
  3131. arrowhead can be set with routine PGSAH, and the the size of the
  3132. arrowhead is determined by the current character size, set by PGSCH.
  3133.  
  3134. Arguments:
  3135.  A      (input)  : horizontal component data array.
  3136.  B      (input)  : vertical component data array.
  3137.  IDIM   (input)  : first dimension of A and B.
  3138.  JDIM   (input)  : second dimension of A and B.
  3139.  I1,I2  (input)  : range of first index to be mapped (inclusive).
  3140.  J1,J2  (input)  : range of second index to be mapped (inclusive).
  3141.  C      (input)  : scale factor for vector lengths, if 0.0, C will be
  3142.                    set so that the longest vector is equal to the
  3143.                    smaller of TR(2)+TR(3) and TR(5)+TR(6).
  3144.  NC     (input)  : vector positioning code.
  3145.                    <0 vector head positioned on coordinates
  3146.                    >0 vector base positioned on coordinates
  3147.                    =0 vector centered on the coordinates
  3148.  TR     (input)  : array defining a transformation between the I,J
  3149.                    grid of the array and the world coordinates. The
  3150.                    world coordinates of the array point A(I,J) are
  3151.                    given by:
  3152.                      X = TR(1) + TR(2)*I + TR(3)*J
  3153.                      Y = TR(4) + TR(5)*I + TR(6)*J
  3154.                    Usually TR(3) and TR(5) are zero - unless the
  3155.                    coordinate transformation involves a rotation
  3156.                    or shear.
  3157.  BLANK   (input) : elements of arrays A or B that are exactly equal to
  3158.                    this value are ignored (blanked).
  3159.  
  3160.  
  3161. ------------------------------------------------------------------------
  3162. Module: PGVSIZ -- set viewport (inches)
  3163. ------------------------------------------------------------------------
  3164.  
  3165.       SUBROUTINE PGVSIZ (XLEFT, XRIGHT, YBOT, YTOP)
  3166.       REAL XLEFT, XRIGHT, YBOT, YTOP
  3167.  
  3168. Change the size and position of the viewport, specifying
  3169. the viewport in physical device coordinates (inches).  The
  3170. viewport is the rectangle on the view surface "through"
  3171. which one views the graph.  All the PG routines which plot lines
  3172. etc. plot them within the viewport, and lines are truncated at
  3173. the edge of the viewport (except for axes, labels etc drawn with
  3174. PGBOX or PGLAB).  The region of world space (the coordinate
  3175. space of the graph) which is visible through the viewport is
  3176. specified by a call to PGSWIN.  It is legal to request a
  3177. viewport larger than the view surface; only the part which
  3178. appears on the view surface will be plotted.
  3179.  
  3180. Arguments:
  3181.  XLEFT  (input)  : x-coordinate of left hand edge of viewport, in
  3182.                    inches from left edge of view surface.
  3183.  XRIGHT (input)  : x-coordinate of right hand edge of viewport, in
  3184.                    inches from left edge of view surface.
  3185.  YBOT   (input)  : y-coordinate of bottom edge of viewport, in
  3186.                    inches from bottom of view surface.
  3187.  YTOP   (input)  : y-coordinate of top  edge of viewport, in inches
  3188.                    from bottom of view surface.
  3189.  
  3190.  
  3191. ------------------------------------------------------------------------
  3192. Module: PGVSTD -- set standard (default) viewport
  3193. ------------------------------------------------------------------------
  3194.  
  3195.       SUBROUTINE PGVSTD
  3196.  
  3197. Define the viewport to be the standard viewport.  The standard
  3198. viewport is the full area of the view surface (or panel),
  3199. less a margin of 4 character heights all round for labelling.
  3200. It thus depends on the current character size, set by PGSCH.
  3201.  
  3202. Arguments: none.
  3203.  
  3204.  
  3205. ------------------------------------------------------------------------
  3206. Module: PGWEDG -- annotate an image plot with a wedge
  3207. ------------------------------------------------------------------------
  3208.  
  3209.       SUBROUTINE PGWEDG(SIDE, DISP, WIDTH, FG, BG, LABEL)
  3210.       CHARACTER *(*) SIDE,LABEL
  3211.       REAL DISP, WIDTH, FG, BG
  3212.  
  3213. Plot an annotated grey-scale or color wedge parallel to a given axis
  3214. of the the current viewport. This routine is designed to provide a
  3215. brightness/color scale for an image drawn with PGIMAG or PGGRAY.
  3216. The wedge will be drawn with the transfer function set by PGSITF
  3217. and using the color index range set by PGSCIR.
  3218.  
  3219. Arguments:
  3220.  SIDE   (input)  : The first character must be one of the characters
  3221.                    'B', 'L', 'T', or 'R' signifying the Bottom, Left,
  3222.                    Top, or Right edge of the viewport.
  3223.                    The second character should be 'I' to use PGIMAG
  3224.                    to draw the wedge, or 'G' to use PGGRAY.
  3225.  DISP   (input)  : the displacement of the wedge from the specified
  3226.                    edge of the viewport, measured outwards from the
  3227.                    viewport in units of the character height. Use a
  3228.                    negative value to write inside the viewport, a
  3229.                    positive value to write outside.
  3230.  WIDTH  (input)  : The total width of the wedge including annotation,
  3231.                    in units of the character height.
  3232.  FG     (input)  : The value which is to appear with shade
  3233.                    1 ("foreground"). Use the values of FG and BG
  3234.                    that were supplied to PGGRAY or PGIMAG.
  3235.  BG     (input)  : the value which is to appear with shade
  3236.                    0 ("background").
  3237.  LABEL  (input)  : Optional units label. If no label is required
  3238.                    use ' '.
  3239.  
  3240.  
  3241. ------------------------------------------------------------------------
  3242. Module: PGWNAD -- set window and adjust viewport to same aspect ratio
  3243. ------------------------------------------------------------------------
  3244.  
  3245.       SUBROUTINE PGWNAD (X1, X2, Y1, Y2)
  3246.       REAL X1, X2, Y1, Y2
  3247.  
  3248. Change the window in world coordinate space that is to be mapped on
  3249. to the viewport, and simultaneously adjust the viewport so that the
  3250. world-coordinate scales are equal in x and y. The new viewport is
  3251. the largest one that can fit within the previously set viewport
  3252. while retaining the required aspect ratio.
  3253.  
  3254. Arguments:
  3255.  X1     (input)  : the x-coordinate of the bottom left corner
  3256.                    of the viewport.
  3257.  X2     (input)  : the x-coordinate of the top right corner
  3258.                    of the viewport (note X2 may be less than X1).
  3259.  Y1     (input)  : the y-coordinate of the bottom left corner
  3260.                    of the viewport.
  3261.  Y2     (input)  : the y-coordinate of the top right corner of the
  3262.                    viewport (note Y2 may be less than Y1).
  3263.  
  3264.  
  3265. ------------------------------------------------------------------------
  3266. Module: PGADVANCE -- non-standard alias for PGPAGE
  3267. ------------------------------------------------------------------------
  3268.  
  3269.       SUBROUTINE PGADVANCE
  3270.  
  3271. See description of PGPAGE.
  3272.  
  3273.  
  3274. ------------------------------------------------------------------------
  3275. Module: PGBEGIN -- non-standard alias for PGBEG
  3276. ------------------------------------------------------------------------
  3277.  
  3278.       INTEGER FUNCTION PGBEGIN (UNIT, FILE, NXSUB, NYSUB)
  3279.       INTEGER       UNIT
  3280.       CHARACTER*(*) FILE
  3281.       INTEGER       NXSUB, NYSUB
  3282.  
  3283. See description of PGBEG.   
  3284.  
  3285.  
  3286. ------------------------------------------------------------------------
  3287. Module: PGCURSE -- non-standard alias for PGCURS
  3288. ------------------------------------------------------------------------
  3289.  
  3290.       INTEGER FUNCTION PGCURSE (X, Y, CH)
  3291.       REAL X, Y
  3292.       CHARACTER*1 CH
  3293.  
  3294. See description of PGCURS.
  3295.  
  3296.  
  3297. ------------------------------------------------------------------------
  3298. Module: PGLABEL -- non-standard alias for PGLAB
  3299. ------------------------------------------------------------------------
  3300.  
  3301.       SUBROUTINE PGLABEL (XLBL, YLBL, TOPLBL)
  3302.       CHARACTER*(*) XLBL, YLBL, TOPLBL
  3303.  
  3304. See description of PGLAB.
  3305.  
  3306.  
  3307. ------------------------------------------------------------------------
  3308. Module: PGMTEXT -- non-standard alias for PGMTXT
  3309. ------------------------------------------------------------------------
  3310.  
  3311.       SUBROUTINE PGMTEXT (SIDE, DISP, COORD, FJUST, TEXT)
  3312.       CHARACTER*(*) SIDE, TEXT
  3313.       REAL DISP, COORD, FJUST
  3314.  
  3315. See description of PGMTXT.
  3316.  
  3317.  
  3318. ------------------------------------------------------------------------
  3319. Module: PGNCURSE -- non-standard alias for PGNCUR
  3320. ------------------------------------------------------------------------
  3321.  
  3322.       SUBROUTINE PGNCURSE (MAXPT, NPT, X, Y, SYMBOL)
  3323.       INTEGER MAXPT, NPT
  3324.       REAL    X(*), Y(*)
  3325.       INTEGER SYMBOL
  3326.  
  3327. See description of PGNCUR.
  3328.  
  3329.  
  3330. ------------------------------------------------------------------------
  3331. Module: PGPAPER -- non-standard alias for PGPAP
  3332. ------------------------------------------------------------------------
  3333.  
  3334.       SUBROUTINE PGPAPER (WIDTH, ASPECT)
  3335.       REAL WIDTH, ASPECT
  3336.  
  3337. See description of PGPAP.
  3338.  
  3339.  
  3340. ------------------------------------------------------------------------
  3341. Module: PGPOINT -- non-standard alias for PGPT
  3342. ------------------------------------------------------------------------
  3343.  
  3344.       SUBROUTINE PGPOINT (N, XPTS, YPTS, SYMBOL)
  3345.       INTEGER N
  3346.       REAL XPTS(*), YPTS(*)
  3347.       INTEGER SYMBOL
  3348.  
  3349. See description of PGPT.
  3350.  
  3351.  
  3352. ------------------------------------------------------------------------
  3353. Module: PGPTEXT -- non-standard alias for PGPTXT
  3354. ------------------------------------------------------------------------
  3355.  
  3356.       SUBROUTINE PGPTEXT (X, Y, ANGLE, FJUST, TEXT)
  3357.       REAL X, Y, ANGLE, FJUST
  3358.       CHARACTER*(*) TEXT
  3359.  
  3360. See description of PGPTXT.
  3361.  
  3362.  
  3363. ------------------------------------------------------------------------
  3364. Module: PGVPORT -- non-standard alias for PGSVP
  3365. ------------------------------------------------------------------------
  3366.  
  3367.       SUBROUTINE PGVPORT (XLEFT, XRIGHT, YBOT, YTOP)
  3368.       REAL XLEFT, XRIGHT, YBOT, YTOP
  3369.  
  3370. See description of PGSVP.
  3371.  
  3372.  
  3373. ------------------------------------------------------------------------
  3374. Module: PGVSIZE -- non-standard alias for PGVSIZ
  3375. ------------------------------------------------------------------------
  3376.  
  3377.       SUBROUTINE PGVSIZE (XLEFT, XRIGHT, YBOT, YTOP)
  3378.       REAL XLEFT, XRIGHT, YBOT, YTOP
  3379.  
  3380. See description of PGVSIZ.
  3381.  
  3382.  
  3383. ------------------------------------------------------------------------
  3384. Module: PGVSTAND -- non-standard alias for PGVSTD
  3385. ------------------------------------------------------------------------
  3386.  
  3387.       SUBROUTINE PGVSTAND
  3388.  
  3389. See description of PGVSTD.
  3390.  
  3391.  
  3392. ------------------------------------------------------------------------
  3393. Module: PGWINDOW -- non-standard alias for PGSWIN
  3394. ------------------------------------------------------------------------
  3395.  
  3396.       SUBROUTINE PGWINDOW (X1, X2, Y1, Y2)
  3397.       REAL X1, X2, Y1, Y2
  3398.  
  3399. See description of PGSWIN.
  3400.