Table of contents


NAME

graph3 - 3-D graphics program from <PLOT79> package

SYNOPSIS

graph3* [ * = device library letter]

DESCRIPTION

Graph3 is a FORTRAN program which is supplied with the <PLOT79> scientific line graphics package, which creates plots of three dimensional data, employing linear or logarithmic axes. A rather large number of options are available, making this quite a powerful program for general line graphing applications. Defaults are provided for all variables, so that the simplest use requires only data points and six titles (any of which may be blank). It is possible to specify viewing parameters to establish a 3-D window and viewport (see the parameters UMIN, UMAX, VMIN and VMAX). The default viewport is in the X-Y plane, Y pointing up and X pointing to the right, just as for the 2-D program grapht. The plottable output is sent to a file named by the CRT environment variable, or to CRT.num if CRT is undefined (num is a number which begins at 1 and is incremented appropriately to prevent files being overwritten).

Graph3 also serves as an example of a driver program for the lower-level routines of <PLOT79>. Input is taken from inputfile, a run-time log is written to the standard output, and graphical output is placed in the file defined by the environment variable CRT, which should be set with the setenv command. In the absence of a CRT value, the system places output in a file named CRT, with an appended version number. The device for which output is intended depends upon which device library was linked to the program at the time of installation (Tektronix 4014 for the default Sun installation). More information on its use, including the format of inputfile, appears in the PLOT79 section of the rdinfo program, and in the section entitled "DETAILED INSTRUCTIONS" below.


FILES

/usr/local/plot79/graph3.f
source code
/usr/local/plot79/graph3*
executable files
/usr/local/plot79/define
various environment definitions, an appropriate subset of which should be placed in the user's .cshrc or .profile file

SEE ALSO

document (1L), drawit(1L), graph3(1L), lptops(1L), pfort(1L), piechtt(1L), plot79-intro(1L), plot79(1L), pluto(1L), pretty(1L), rdinfo(1L), sf3(1L), slides(1L), tekalw(1L), tkvecs(1L), tmacro(1L), world(1L)

AUTHOR

Nelson H. F. Beebe, Ph.D.

Center for Scientific Computing

South Physics Building

University of Utah

Salt Lake City, UT 84112

Tel: (801) 581-5254

(Manual page by R. P. C. Rodgers, Computer Applications in Laboratory Medicine Project, UCSF, San Francisco, CA 94143).


DETAILED INSTRUCTIONS

Input is free format and keyword-driven. Here is an example of an input file:

 $DATA
 X(  1,1)=   0.00000,   Y(  1,1)=   0.00000,   Z(  1,1)=   0.00000,
 X(  2,1)=   0.51382,   Y(  2,1)=   0.38347,   Z(  2,1)=   0.41106,
 X(  3,1)=   0.36485,   Y(  3,1)=   1.22928,   Z(  3,1)=   1.64425,
 X(  4,1)=  -0.66428,   Y(  4,1)=   1.80507,   Z(  4,1)=   3.69955,
 X(  5,1)=  -2.14933,   Y(  5,1)=   1.39906,   Z(  5,1)=   6.57698,
 X(  6,1)=  -3.19912,   Y(  6,1)=  -0.20538,   Z(  6,1)=  10.27654,
       ZFACT(1)=0.01,
       NXSUB=5,NYSUB=5,
       MARK(1)=3,NU(1)=1,
       HSCALE=0.72222222,
       IDFONT=5,
       PPXYZ(1)=0,0,1,
       VNXYZ(1)=0,.2,1,
       PPXYZ(1)=1,1,1,
       VNXYZ(1)=1,1,1,
       UMIN=-25,UMAX=25,DUSUB=5,
       VMIN=-25,VMAX=25,DVSUB=5,
       XMIN=-20, XMAX=+20, DXSUB=5,
       YMIN=-20,YMAX=+20, DYSUB=5,
       ZMIN=-20,ZMAX=+20, DZSUB=5,
       RESET=F,
 $END
Graph of Spiral
X
Y
Z
U
V

There are two sections: the first is NAMELIST-like and contains (between $DATA and $END) the data and various commands defining the appearance of the plot. This is followed by six 120-character title lines for the main title of the graph, the X-axis title, the Y-axis title, the Z-axis title, the U-axis title, and the V-axis title.

The file may contain multiple sets of $DATA...$END and label lines; one plot will be generated for each set. The maximum number of curves and data points allowed depends upon array dimensions set in the <PLOT79> routine GRFGG3.

There follow three sections, dealing with: plot labels, plot formatting commands, and data value storage.


PLOT LABELS

The last non-blank character in each title will be used to determine the title length, and the resulting string will be centered on the plot. Lower-case letters may be used in titles, if they are available. Otherwise, they can be obtained by using the case switch characters, "<" and ">" (left and right angle brackets), which convert following letters to upper and lower case respectively. A double appearance of a switch character suppresses its interpretation as a case switch, and causes a single representation of the character to be displayed in the plotted string. Multiple line titles can be obtained by separating the line strings by the two-character sequence $N or $n. Thus, if the graph title line supplied is:

Label 1$NLabel 2$NLabel 3

then the graph title will be three centered lines.

When multiple-line titles are requested, it will usually be necessary to reduce the horizontal and vertical extent of the plot through the options HSCALE and VSCALE in order to make the margins sufficiently large for the title text.


PLOT FORMATTING COMMANDS

There is a detailed description of each command following the list by category.

List of Commands by Category

Axis control
AXES3D, DUSUB, DVSUB, DXSUB, DYSUB, DZSUB, LOGX, LOGY, LOGZ, MODEU, MODEV, MODEX, MODEY, MODEZ, NUSUB, NVSUB, NXSUB, NYSUB, NZSUB, TICKU, TICKV, TICKX, TICKY, TICKZ, UAXIS, UMIN, UMAX, UVAXES, VAXIS, VMIN, VMAX, XAXIS, XFALLS, XMIN, XMAX, YAXIS, YFALLS, YMIN, YMAX, ZAXIS, ZFALLS, ZMIN, ZMAX
Clipping control
BCLIP, FCLIP, WCLIP
Curve display transformations
AVRAGE(*), DERIV(*), INTGRT(*)
Curve styles
LSTYLE(*), LWIDTH(*), PEN(*)
Data point transformations
XFACT(*), YFACT(*), ZFACT(*), XSHIFT(*), YSHIFT(*), ZSHIFT(*)
Graph size and aspect ratio
SIZEIN, SIZECM, HSCALE, VSCALE
Interpolation
CHKDUP, NUMINT(*), SIGMA(*)
Labelling
IDFONT, PENDIA, title lines
Listing control
LSTXYZ
Markers
MARK(*), NU(*), SIZEMK
Number of curves
KX, KY, KZ
Raw data points
X(*,*), Y(*,*), Z(*,*), N(*)
Viewing control
BCLIP, FCLIP, WCLIP, UMIN, UMAX, VMIN, VMAX, RIGHT, PARLEL, PERDST, PPXYZ(*), RPXYZ(*), UPXYZ(*), VIEWD, VNXYZ(*), TMODEL(*,*), TIMAGE(*,*)

Mandatory Commands (Data)

X(I,K)
The X value of point I in curve K. X values must be in ascending order if integration, averaging, or differentiation of the input curves are requested. Interpolation can be done for arbitrary curves in the plane, including closed curves (signalled by the first point being the same as the last point). For histogram plots, bar I in curve K has width BWIDTH(K), center at X(I,K), bottom at YBASE(K), and top at Y(I,K).
Y(I,K)
The Y value of point I in curve K.
Z(I,K)
The Z value of point I in curve K.

Optional Commands (Defaults Often Adequate)

AVRAGE(K)
.TRUE. - Plot accumulated average of curve K. This is drawn with the same line type as the curve itself, but no data point symbols are marked.

.FALSE. - No averages plotted (default).
AXES3D
.TRUE. - Plot 3-D x, y, and z axes (default).

.FALSE. - No 3-D axes drawn.
BCLIP
.TRUE. - Back clipping on.

.FALSE. - Back clipping off (default).
BOX
.TRUE. - Draw a box around the outer plot frame (default).

.FALSE. - Omit the outer frame box.
CHKDUP
.TRUE. - Eliminate adjacent duplicate points in each curve. This is only useful when interpolation is being done.

.FALSE. - No duplicate point check (default).
DERIV(K)
.TRUE. - Plot derivative of interpolated curve K.

.FALSE. - Plot curve K itself (default). This option has no effect unless NUMINT(K) .NE. 0.
DUSUB
Step size between ticks on the U-axis. If specified, it overrides any NUSUB (see below) value provided. It may be adjusted, however, if UMIN and UMAX are determined internally.
DVSUB
Step size between ticks on the V-axis. If specified, it overrides any NVSUB (see below) value provided. It may be adjusted, however, if VMIN and VMAX are determined internally.
DXSUB
Step size between ticks on the X-axis. If specified, it overrides any NXSUB (see below) value provided. It may be adjusted, however, if XMIN and XMAX are determined internally.
DYSUB
Step size between ticks on the Y-axis. If specified, it overrides any NYSUB (see below) value provided. It may be adjusted, however, if YMIN and YMAX are determined internally.
DZSUB
Step size between ticks on the Z-axis. If specified, it overrides any NZSUB (see below) value provided. It may be adjusted, however, if ZMIN and ZMAX are determined internally.
FCLIP
.TRUE. - Front clipping on.

.FALSE. - Front clipping off (default).
HSCALE
Normally, the plot is made inside a frame 6.5 inches high and 9.0 inches wide centered inside an outer 8.5 x 11.0 inch frame, with numbering and labelling in the 1 inch margin. These values may be slightly different when the standard paper size is not ANSI A format. Sometimes, the numbers occupy too much space, and shrinking the inner frame is desirable. HSCALE may be provided as a number in the range 0.0-1.0 to scale the frame horizontally. (See also VSCALE below). A square inner frame may be obtained by setting HSCALE = 6.5/9.0 = 0.722222.
IDFONT
Hershey font identifier. Of the 144 font varieties available with the Hershey fonts, the following are available in this routine by a value for IDFONT in the range 1-5: 1 - UCKR1/UCKG1/UCII1/UCSS1 (Cartographic Roman/Greek, Indexical Italic, Simplex Script) 2 - UCSR1/UCSG1/UCII1/UCSS1 (Simplex Roman/Greek, Indexical Italic, Simplex Script) 3 - UCCR1/UCCG1/UCCI1/UCCS1 (Complex Roman/Greek, Complex Italic, Complex Script) (Default) 4 - UCTR1/UCCG1/UCCI1/UCCS1 (Triplex Roman, Complex Greek, Complex Italic, Complex Script) 5 - UCDR1/UCCG1/UCCI1/UCCS1 (Duplex Roman, Complex Greek, Complex Italic, Complex Script) The font selector characters are:

@ -- Roman (default)

# -- Greek

! -- Italic

& -- Script A doubled selector character will be treated as a single appearance of that character rather than as a font selector character. For example, the string Wolf (!Canis Lupus@)!! would result in "Wolf ()!" in Roman letters, and "Canis Lupus" in italics. See the documentation for SYMTX and the Hershey fonts for details.

INTGRT(K)
.TRUE. - Plot integral of curve K. This is drawn with the same line type as the curve itself, but no data point symbols are marked.

.FALSE. - No integration (default).
KX
Number of sets of X values. If not supplied, KX will be set to the index of the last curve for which a value has been set in X(1,KX). If entries beyond the KX-th position are found in XSHIFT(*) or XFACT(*), and KX is being determined automatically, then the KX-th set of X values will be automatically copied into succeeding sets and KX incremented accordingly. For example, one may wish to plot several sets histogram bars scaled or shifted about a common set of X values; by not specifying KX, only one set of X values need be provided.
KY
Number of sets of Y values. If not supplied, KY will be set to the index of the last curve for which a value has been set in Y(1,KY). If KX .NE. KY, the last set of X or Y values will be assumed to apply to the remaining ones. Thus, if there are 3 sets of Y values, each having the same X values, set KY=3 and KX=1, so that the X values need not be input three times. If entries beyond the KY-th position are found in YSHIFT(*) or YFACT(*), and KY is being determined automatically, then the KY-th set of Y values will be automatically copied into succeeding sets and KY incremented accordingly.
KZ
Number of sets of Z values. If not supplied, KZ will be set to the index of the last curve for which a value has been set in Z(1,KZ). If KX .NE. KZ, the last set of X or Z values will be assumed to apply to the remaining ones. Thus, if there are 3 sets of Z values, each having the same X values, set KZ=3 and KX=1, so that the X values need not be input three times. If entries beyond the KZ-th position are found in ZSHIFT(*) or ZFACT(*), and KZ is being determined automatically, then the KZ-th set of Z values will be automatically copied into succeeding sets and KZ incremented accordingly.
LOGX
.TRUE. - Logarithmic X-axis. When LOGX, LOGY, or LOGZ are found to be .TRUE., the corresponding X, Y, or Z data values are replaced by their base-10 logarithms. The conversion is done only once, even if the RESET=.FALSE. option is used. .FALSE. - Linear X-axis (default).
LOGY
.TRUE. - Logarithmic Y-axis. .FALSE. - Linear Y-axis (default).
LOGZ
.TRUE. - Logarithmic Z-axis. .FALSE. - Linear Z-axis (default).
LSTXYZ
.TRUE. - Print the input X, Y, and Z values (default). .FALSE. - Suppress the printing of the input X and Y values.
LSTYLE(K)
The line style (1,2,...) to be used for curve K. See manual page linestyle(1L). The default is 1, which produces a solid line. Other values (2,3,...) give a variety of dashed lines. If LSTYLE(K) <= 0, then the data points for curve K are not connected by line segments. In such a case, one should normally set NU(K) = 1, so that a mark is placed at each point.
LWIDTH(K)
The line width (0.0-1.0) to be used for curve K. The default is 0.0, giving a line of minimal width. The width doubles for each increment of 0.05.
MARK(K)
The plot symbol used for marking points on curve K (1-20). See manual page markstyle(1L). The default is K. A special option is available with MARK(K) = -1, -2, or -3. In this case, every NU(K)-th point (X,Y,Z) will be connected to (X,0,0) (if MARK(K) = -1), (0,Y,0) (if MARK(K) = -2), or (0,0,Z) (if MARK(K) = -3). This can sometimes be used advantageously to enhance the 3-D appearance of a graph.
MODEU
Labelling and numbering mode for U-axis. This is set by adding one or more of the following option values, and then setting the sign of the resulting sum to select numbering and titling above (+) or below (-) the axis.

1 - Number the axis. Even values of MODEU suppress numbering, but still affect the choice of tick mark spacing.

2 - Number perpendicularly (rotated -90 degrees) to the axis; otherwise it is parallel to the axis.

4 - Omit the first number along the axis. This can be useful to prevent text overlap when more than one axis is drawn from a point.

8 - Omit the last number along the axis.

16 - Omit any zero number along the axis. This can be useful for drawing axes intersecting at the origin (not applicable if logarithmic axes have been requested).

Any value outside the legal range of -31 to 31 (or -15 to 15 if logarithmic axes have been requested) will raise an error condition.

The sizes and positions of number labels, even if they are not drawn, affect the choice of where longer tick marks are drawn. In the common case where the four sides of a graph have axes, but two are unnumbered, for the unnumbered axes, simply subtract 1 from the unsigned MODEU value used for the opposite numbered axis.

MODEV
Labelling and numbering mode for V-axis. See remarks for MODEU.
MODEX
Labelling and numbering mode for X-axis. See remarks for MODEU. The usual choice for a numbered lower horizontal (X) axis will be MODEX=-1, and for an unnumbered upper horizontal axis will be MODEX=0.
MODEY
Labelling and numbering mode for Y-axis. See remarks for MODEU. The usual choice for a numbered left vertical (Y) axis will be MODEY=+3, and for an unnumbered right vertical axis will be MODEY=+2 or -2.
MODEZ
Labelling and numbering mode for Z-axis. See remarks for MODEU.
N(K)
The number of points in curve K. Normally, the number N(K) will be determined automatically by finding the last user-provided entry in X(*,K), Y(*,K), or Z(*,K). If it is desired to plot fewer points than there are data values, then N(K) should be explicitly specified. A value of 0 will suppress plotting of the corresponding curve.
NU(K)
The symbol-plotting frequency for curve K. Every NU(K)-th point will be marked with symbol MARK(K). The default is 0, for which marking is suppressed.
NUMINT(K)
The total number of points to interpolate on curve K for plotting. If zero, no spline interpolation will be done for that curve (default).
NUSUB
Number of U-axis subdivisions if scale linear. If negative, the number of subdivisions will be adjusted to approximately -NUSUB to obtain "nice" values (default).
NVSUB
Number of V-axis subdivisions if scale linear. If negative, the number of subdivisions will be adjusted to approximately -NVSUB to obtain "nice" values (default).
NXSUB
Number of X-axis subdivisions if scale linear. If negative, the number of subdivisions will be adjusted to approximately -NXSUB to obtain "nice" values (default).
NYSUB
Number of Y-axis subdivisions if scale linear. If negative, the number of subdivisions will be adjusted to approximately -NYSUB to obtain "nice" values (default).
NZSUB
Number of Z-axis subdivisions if scale linear. If negative, the number of subdivisions will be adjusted to approximately -NZSUB to obtain "nice" values (default).
PARLEL
.TRUE. - Parallel projection (default).

.FALSE. - Perspective projection.
PEN(K)
Pen numbers for curve K. The meaning of these numbers (1,2,...) must generally be agreed upon in advance with the plotter operator. The default is 1. On a pen plotter, this is usually a black pen.
PENDIA
Pen diameter scale factor (default 0.0). This option allows one to simulate a thick pen when text is drawn. Each character is drawn repeatedly, stepping its origin around a small circle representing the pen diameter. For convenience, the diameter value is given as a fraction of the character height, rather than as an absolute number. A value of about 0.01 to 0.03 often gives reasonable results. A value of 0.0 will revert to normal text plotting.
PERDST
Distance of perspective projective point (eye point) measured from view reference point in direction of view plane normal. If specified, this option forces PARLEL=.FALSE. and sets: PPXYZ(*) = RPXYZ(*) + PERDST * (unit view plane normal) Since the view plane normal points into the window, the projective point should be in front of the window, so PERDST should in general be negative. For very large negative values of PERDST, the perspective projection becomes indistinguishable from a parallel projection. When non-skewed perspective views are required, PERDST is a more convenient parameter than setting PARLEL and PPXYZ(*) together.
PPXYZ(*)
(X,Y,Z) coordinates of projective point (default (0,0,1)).
RESET
.TRUE. - Reset defaults for next set of input data.

.FALSE. - Use current parameter values as defaults for next set of input data.
RIGHT
.TRUE. - Right-handed coordinate system (default).

.FALSE. - Left-handed coordinate system.
RPXYZ(*)
(X,Y,Z) coordinates of reference point (default (0,0,0)).
SIGMA(K)
The tensioned spline parameter for curve K. See manual page splinepar(1L). Default 1.0.
SIZECM
Size in centimeters of the plot unit square on the selected plot device. Default is 27.94 (11 inches), or whatever is the longest dimension of the local standard paper size. If both SIZECM and SIZEIN are specified, SIZEIN is used.
SIZEIN
Size in inches of the plot unit square on the selected plot device. Default is 11.0, or whatever is the longest dimension of the local standard paper size.
SIZEMK
Marker height scale factor (default 1.0). Marker heights can be uniformly scaled up or down by changing this value.
TICKU
Length (on unit square) of tick marks on U-axis. If ABS(TICKU) > 1.0, vertical grid lines will be drawn.
TICKV
Length (on unit square) of tick marks on V-axis. If ABS(TICKV) > 1.0, vertical grid lines will be drawn.
TICKX
Length (on unit square) of tick marks on X-axis. If ABS(TICKX) > 1.0, vertical grid lines will be drawn.
TICKY
Length (on unit square) of tick marks on Y-axis. If ABS(TICKY) > 1.0, vertical grid lines will be drawn.
TICKZ
Length (on unit square) of tick marks on Z-axis. If ABS(TICKZ) > 1.0, vertical grid lines will be drawn.
TIMAGE(*,*)
4-D image transformation matrix to be applied to image in NDC space (default: unit matrix).
TMODEL(*,*)
4-D modelling transformation matrix to be applied to object coordinates before transforming to window coordinates (default: unit matrix).
UAXIS
.TRUE. - draw U axis (default).

.FALSE. - suppress U axis.
UMAX
Right window margin in world coordinates.
UMIN
Left window margin in world coordinates.
UPXYZ(*)
(X,Y,Z) coordinates of view up vector whose projection on the view plane defines the up direction (default (0,1,0)).
VAXES
.TRUE. - Draw horizontal and vertical window axes (default).

.FALSE. - No window axes.
VAXIS
.TRUE. - draw V axis (default).

.FALSE. - suppress V axis.
VIEWD
View distance, measured from view reference point in direction of view plane normal, to view plane (default 0).
VMAX
Top window margin in world coordinates.
VMIN
Bottom window margin in world coordinates.
VNXYZ(*)
(X,Y,Z) coordinates of view plane normal vector (default (0,0,-1)).
VSCALE
Vertical scale factor (0.0-1.0: values outside this range will be reset to 1.0).
WCLIP
.TRUE. - Window clipping on (default).

.FALSE. - Window clipping off.
WMAX
Back depth measured in direction of view plane normal from view reference point. It has no effect unless BCLIP = .TRUE.
WMIN
Front depth measured in direction of view plane normal from view reference point. It has no effect unless FCLIP = .TRUE. WMIN must be less than WMAX.
XAXIS
.TRUE. - draw X axis (default).

.FALSE. - suppress X axis.
XFACT(K)
Input X-data scale factors for curve K. The input values X(*,K) will be multiplied by XFACT(K). This is frequently convenient to avoid having to type decimal points in the X-values. After use, XFACT(K) is reset to 1.0 to avoid rescaling the data if it is reused on a subsequent pass with RESET=.FALSE.
XFALLS
.TRUE. - Descending X scale.

.FALSE. - Ascending X scale (default).
XMAX
Maximum X value to plot. It is perfectly permissible for data points to lie outside the range (XMIN,XMAX) and (YMIN,YMAX). If XMIN and XMAX are not supplied, "nice" values will be determined automatically. For a logarithmic axis (LOGX = .TRUE.), XMIN and XMAX represent the extremes BEFORE conversion to logarithms, and should normally be chosen to be powers of ten.
XMIN
Minimum X value to plot.
XSHIFT(K)
Shift constants for X data of curve K. XSHIFT(K) will be added to X(*,K) after multiplying the input X(*,K) values by XFACT(*). After use, XSHIFT(K) is reset to 0.0 to avoid shifting the data again if it is reused on a subsequent pass with RESET=.FALSE.
YAXIS
.TRUE. - draw Y axis (default).

.FALSE. - suppress Y axis.
YFACT(K)
Y-data scale factors for curve K. The input values Y(*,K) will be multiplied by YFACT(K). After use, YFACT(K) is reset to 1.0 to avoid rescaling the data if it is reused on a subsequent pass with RESET=.FALSE.
YFALLS
.TRUE. - Descending Y scale.

.FALSE. - Ascending Y scale (default).
YMAX
Maximum Y value to plot. See remarks about XMAX and XMIN above.
YMIN
Minimum Y value to plot.
YSHIFT(K)
Shift constants for Y data of curve K. YSHIFT(K) will be added to Y(*,K) after multiplying the input Y(*,K) values by YFACT(*). After use, YSHIFT(K) is reset to 0.0 to avoid shifting the data again if it is reused on a subsequent pass with RESET=.FALSE.
ZAXIS
.TRUE. - draw Z axis (default).

.FALSE. - suppress Z axis.
ZFACT(K)
Z-data scale factors for curve K. The input values Z(*,K) will be multiplied by ZFACT(K). After use, ZFACT(K) is reset to 1.0 to avoid rescaling the data if it is reused on a subsequent pass with RESET=.FALSE.
ZFALLS
.TRUE. - Descending Z scale.

.FALSE. - Ascending Z scale (default).
ZMAX
Maximum Z value to plot. See remarks about XMAX and XMIN above.
ZMIN
Minimum Z value to plot.
ZSHIFT(K)
Shift constants for Z data of curve K. ZSHIFT(K) will be added to Z(*,K) after multiplying the input Z(*,K) values by ZFACT(*). After use, ZSHIFT(K) is reset to 0.0 to avoid shifting the data again if it is reused on a subsequent pass with RESET=.FALSE.

A NOTE ABOUT DATA STORAGE

The points in a given curve are in consecutive storage locations (i.e. in the columns of X(*,*), Y(*,*), and Z(*,*)), and because few FORTRAN implementations provide bounds checking, it is possible for the user to specify more than MAXVAL points in a single curve. For example, if two curves each containing between 2*MAXVAL and 3*MAXVAL points were to be plotted, one could enter them as curves 1 and 4, explicitly setting N(*) = n1, 0, 0, n2. A single curve of as many as MAXVAL*MAXCRV points could be plotted using this trick.