PLOTP
Prints a plot of up to 10 sets of points.
Required Arguments
X — Vector of length NDATA containing the values of the independent variable. (Input)
A — Matrix of dimension NDATA by NFUN containing the NFUN sets of dependent variable values. (Input)
SYMBOLCHARACTER string of length NFUN. (Input)
SYMBOL (I : I) is the symbol used to plot function I.
XTITLECHARACTER string used to label the x‑axis. (Input)
YTITLECHARACTER string used to label the y‑axis. (Input)
TITLECHARACTER string used to label the plot. (Input)
Optional Arguments
NDATA — Number of independent variable data points. (Input)
Default: NDATA = size (X,1).
NFUN — Number of sets of points. (Input)
NFUN must be less than or equal to 10.
Default: NFUN = size (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = size (A,1).
INC — Increment between elements of the data to be used. (Input)
PLOTP plots X(1 + (I – 1) * INC) for I = 1, 2, , NDATA.
Default: INC = 1.
RANGE — Vector of length four specifying minimum x, maximum x, minimum y and maximum y. (Input)
PLOTP will calculate the range of the axis if the minimum and maximum of that range are equal.
Default: RANGE = 1.0.
FORTRAN 90 Interface
Generic: CALL PLOTP (X, A, SYMBOL, XTITLE, YTITLE, TITLE [])
Specific: The specific interface names are S_PLOTP and D_PLOTP.
FORTRAN 77 Interface
Single: CALL PLOTP (NDATA, NFUN, X, A, LDA, INC, RANGE, SYMBOL, XTITLE, YTITLE, TITLE)
Double: The double precision name is DPLOTP.
Description
Routine PLOTP produces a line printer plot of up to ten sets of points superimposed upon the same plot. A character “M” is printed to indicate multiple points. The user may specify the x and y‑axis plot ranges and plotting symbols. Plot width and length may be reset in advance by calling PGOPT.
Comments
1. Informational errors
Type
Code
Description
3
7
NFUN is greater than 10. Only the first 10 functions are plotted.
3
8
TITLE is too long. TITLE is truncated from the right side.
3
9
YTITLE is too long. YTITLE is truncated from the right side.
3
10
XTITLE is too long. XTITLE is truncated from the right side. The maximum number of characters allowed depends on the page width and the page length. See Comment 5 below for more information.
2. YTITLE and TITLE are automatically centered.
3. For multiple plots, the character M is used if the same print position is shared by two or more data sets.
4. Output is written to the unit specified by routine UMACH (see the "Reference Material").
Default page width is 78 and default page length is 60. They may be changed by calling PGOPT in advance.
Example
This example plots the sine and cosine functions from – 3.5 to + 3.5 and sets page width and length to 78 and 40, respectively, by calling PGOPT (see Chapter 19, “Utilities” in advance.
 
USE PGOPT_INT
USE PLOTP_INT
 
IMPLICIT NONE
INTEGER I, IPAGE
REAL A(200,2), DELX, PI, RANGE(4), X(200)
CHARACTER SYMBOL*2
INTRINSIC COS, SIN
!
DATA SYMBOL/'SC'/
DATA RANGE/-3.5, 3.5, -1.2, 1.2/
!
PI = 3.14159
DELX = 2.*PI/199.
DO 10 I= 1, 200
X(I) = -PI + FLOAT(I-1) * DELX
A(I,1) = SIN(X(I))
A(I,2) = COS(X(I))
10 CONTINUE
! Set page width and length
IPAGE = 78
CALL PGOPT (-1, IPAGE)
IPAGE = 40
CALL PGOPT (-2, IPAGE)
CALL PLOTP (X, A, SYMBOL,'X AXIS', 'Y AXIS', 'C = COS, S = SIN')
!
END
Output
C = COS, S = SIN
1.2 ::::+:::::::::::::::+:::::::::::::::+:::::::::::::::+::::
. I .
. I .
. CCCCCCC SSSSSSSS .
. CC I CC SS SS .
0.8 + C I C SS SS +
. C I MS SS .
. C I SSC SS .
. CC I SS CC SS .
. CC I S CC S .
0.4 + C I S C S +
. C I SS C SS .
Y . CC I S CC S .
. C IS C S .
A . C SS C SS .
X 0.0 +--S-----------CC-----------S-----------CC-----------S--+
I . SS CC SS CC .
S . S C SI C .
. S CC S I CC .
. SS C SS I C .
-0.4 + S C S I C +
. S CC S I CC .
. SS CC SS I CC .
. SSC SS I C .
. MS SS I C .
-0.8 + C SS SS I C +
. CC SS SS I CC .
. CCCC SSSSSSSS I CCCC .
. C I C .
. I .
-1.2 ::::+:::::::::::::::+:::::::::::::::+:::::::::::::::+::::
-3 -1 1 3
X AXIS