Previous: grfgd Up: ../plot79_g.html Next: grfgg3
SUBROUTINE GRFGG (NIN,NOUT) C$ (General 2-D Graph Routine) C$ C$ This routine makes a plot of one or more sets of input C$ data, in either linear or logarithmic form, or in histogram C$ form, with single or multiple plots on each page. A rather C$ large number of options are available, making this quite a C$ powerful program for general line graphing applications. C$ Nevertheless, defaults are provided for all variables, so C$ that the simplest uses require only the data points (X,Y) C$ themselves, and three titles (which may be blank). C$ C$ The input is provided in NAMELIST $DATA ... $END. The use C$ of NAMELIST input is the only violation of Portable FORTRAN C$ in this routine. It is so useful, however, that it has C$ been used anyway. On machines which do not support it, an C$ alternate version may be developed which permits C$ keyword-driven free-form input. C$ C$ The arguments are: C$ C$ NIN......FORTRAN input unit number. C$ NOUT.....FORTRAN print unit number. C$ C$ For generality, physical page dimensions are specified in C$ terms of an abstract dimension, which we call 'units'. The C$ input values MARGIN(*), PAGEX, and PAGEY are all in these C$ units. The scaling to the metric system of measurement is C$ done by multiplying by a scale factor, UNITS. Here are C$ some typical values: C$ C$ ----- ---------------- C$ UNITS Input dimensions C$ ----- ---------------- C$ 2.54 inches (default) C$ 0.01 meters C$ 1.00 centimeters C$ 10.00 millimeters C$ ----- ---------------- C$ C$---------------------------------------------------------------------- C$ C$ The input variables are as follows: C$ C$ a) Required values: C$ C$ X(*,*).......X(I,K) is point I in curve K. X values must C$ be in ***ASCENDING*** order if integration, C$ averaging, or differentiation of the input C$ curves are requested. Interpolation can be C$ done for arbitrary curves in the plane, C$ including closed ones signalled by the first C$ point being the same as the last point. For C$ histogram plots, histogram bar I in curve K C$ has width BWIDTH(K), center at X(I,K), bottom C$ at YBASE(K), and top at Y(I,K). C$ C$ Y(*,*).......Y(I,K) is point I in curve K. C$ C$ b) Optional values (defaults normally adequate): C$ C$ AVRAGE(*).... .TRUE. - Plot accumulated average of curve K. C$ This is drawn with the same line C$ type as the curve itself, but no C$ data point symbols are marked. C$ .FALSE. - No averages plotted (default). C$ C$ BOX.......... .TRUE. - Draw a box around the outer plot C$ frame (default). C$ .FALSE. - Omit the outer frame box. C$ C$ BWIDTH(*)....BWIDTH(K) is the width of histogram bars for C$ data in curve K. C$ C$ BYROWS....... .TRUE. - Display frames in multi-frame plots C$ in row order. C$ .FALSE. - Display frames in column order. C$ C$ CHKDUP....... .TRUE. - Check for adjacent duplicate points C$ in each curve and eliminate the C$ duplicate ones. This is only useful C$ when interpolation is being done. C$ .FALSE. - No duplicate point check (default). C$ C$ DERIV(*)..... .TRUE. - Plot derivative of interpolated C$ curve K. C$ .FALSE. - Plot curve K itself (default). C$ This option has no effect unless NUMINT(K) C$ .NE. 0. When derivative plotting is C$ requested, it will be necessary to explicitly C$ supply YMIN, DYSUB, and YMAX, since these will C$ in general be unrelated to the input values C$ Y(*,*) from which the default YMIN, DYSUB, and C$ YMAX are determined. C$ C$ DFXERR.......Fraction of window width to be used for C$ terminating horizontal bars on vertical error C$ bars (default 0.02). C$ C$ DFYERR.......Fraction of window height to be used for C$ terminating vertical bars on horizontal error C$ bars (default 0.02). C$ C$ DXSUB........Step size between ticks on the X-axis. If C$ specified, it overrides any NXSUB (see below) C$ value provided. It may be adjusted, however, C$ if XMIN and XMAX are determined internally. C$ It is ignored for logarithmic axes. C$ C$ DYSUB........Step size between ticks on the Y-axis. If C$ specified, it overrides any NYSUB (see below) C$ value provided. It may be adjusted, however, C$ if YMIN and YMAX are determined internally. C$ It is ignored for logarithmic axes. C$ C$ FILLIN(*)....Polygon fill indices for histogram bars in C$ curve K. The default fill index for curve K C$ is 6*(K-1), a cross-hatched diagonal pattern. C$ Fill index 0 implies no filling. Values in C$ the range 1..84 produce successively denser C$ patterns, and values larger than 84 encode C$ user-defined patterns as described in CORE C$ routine SETPFI. C$ C$ FSCALE.......Frame scale factor. In a multi-frame plot, C$ this option is normally used to reduce the C$ plot data area into a smaller frame centered C$ in the frame cell, so as to leave space for C$ labelling of the axes and frame (default C$ FSCALE = 1.0). Overall frame scaling may be C$ further affected by HSCALE and VSCALE scaling. C$ FSCALE must be set smaller than 1.0 if C$ labelling is required, since labelling is C$ suppressed if there is insufficient space for C$ it. C$ C$ FSTYLE.......Frame box line style. The default value of 0 C$ suppresses the drawing of a box around each C$ frame of a multi-frame plot. Non-zero integer C$ values select the line style for the C$ surrounding box. C$ C$ GSCALE.......Global graph scale factor. The plot will be C$ scaled, preserving the page aspect ratio, such C$ that the longer page dimension matches GSCALE C$ * max(PAGEX, PAGEY) (default GSCALE = 1.0). C$ C$ HISTGM(*).... .TRUE. - Plot histogram of curv