SUBROUTINE EZMXY ( X, Y, N, CNT, M, TYPE, DEV, TITLE ) C C This subroutine invokes the Cal Teck Graphics Package (ugh!) to make C a simple plot. C X(I), Y(I,J) are the points to be plotted C N is the number of points in the plot (i = 1, N) C M is the number of graphs, (j=1,M) C TYPE determines the type of line to draw. The value is C coded as 100*(line type number) + point type number. C number line type symbol type C 0 no line no mark C 1 solid box C 2 dashed plus C 3 dashed-dot circle C 4 dotted x C 5 triangle C C DEV is the device type. C '/EGA ' is the screen C '?' prompts the user for a device C otherwise it is a hardcopy c TITLE contains the axis labels C IMPLICIT UNDEFINED (A-Z) SAVE INTEGER *4 N, CNT, M, I, J, K, L, SYMBOL(5), TYPE(*) INTEGER *4 ICOLOR REAL *4 X(CNT), Y(CNT,M), XMIN, XMAX, YMIN, YMAX REAL *4 XLO, XHI, YLO, YHI CHARACTER *(*) DEV, TITLE(6) LOGICAL HCOPY INCLUDE 'HARDCOPY.INC' DATA NPLOTS / 0 / DATA SYMBOL / 16, 3, 5, 6, 13 / C C PGBEGIN will initiate PGPLOT, open the output device, C and set the device type. The default type is the screen. C IF ( DEV(1:5) .EQ. '/EGA' ) THEN HCOPY = .FALSE. CALL PGBEGIN(0, '/EGA', 1, 1) ELSE HCOPY = .TRUE. NPLOTS = NPLOTS + 1 WRITE( PLOTFILE(6:8),'(I3.3)') NPLOTS CALL PGBEGIN(0, PLOTFILE//PLOT_DEV, 1, 1) END IF C C Determine the range of the data, and use PGENV to set the range of the C axes and to draw a box. PGLABEL is used to label it. C XMIN = X(1) YMIN = Y(1,1) XMAX = X(1) YMAX = Y(1,1) DO 60 I = 1, N XMIN = MIN ( XMIN, X(I) ) XMAX = MAX ( XMAX, X(I) ) DO 50 J = 1, M YMIN = MIN ( YMIN, Y(I,J) ) YMAX = MAX ( YMAX, Y(I,J) ) 50 CONTINUE 60 CONTINUE C Set Roman characters C CALL PGSCF ( 2 ) C C Set thick lines for the letters C C CALL PGSLW ( 2 ) C C Set color C ICOLOR = 5 CALL PGSCI ( ICOLOR ) C C Set big letters so that PGENV will leave C more room around the plot. CALL PGSCH ( 1.5 ) CALL PGRNGE ( XMIN, XMAX, XLO, XHI ) CALL PGRNGE ( YMIN, YMAX, YLO, YHI ) CALL PGENV ( XLO, XHI, YLO, YHI, 0, 1 ) C C In order, TITLE contains X-axis label C Y-axis label C The big top label. C The second top label. C The right hand label. C Information line on bottom. C CALL PGMTEXT ( 'T', 2.5, 0.5, 0.5, TITLE(3) ) CALL PGSCH ( 1.0 ) CALL PGMTEXT ( 'B', 3.5, 0.5, 0.5, TITLE(1) ) CALL PGMTEXT ( 'L', 3.5, 0.5, 0.5, TITLE(2) ) CALL PGMTEXT ( 'T', 1.5, 0.5, 0.5, TITLE(4) ) CALL PGMTEXT ( 'R', 2.5, 0.5, 0.5, TITLE(5) ) CALL PGMTEXT ( 'B', 5.0, 0.5, 0.5, TITLE(6) ) C C Reset line width to narrow C C CALL PGSLW ( 1 ) C ICOLOR = 1 DO 80 J = 1, M C C Plot a line if line type was specified. A new color for each line. C ICOLOR = ICOLOR + 1 CALL PGSCI ( ICOLOR ) K = TYPE(J) / 10 IF ( (K.GT.0) .AND. (K.LE.5) ) THEN CALL PGSLS ( K ) CALL PGLINE ( N, X(1), Y(1,J) ) END IF C C PLOT THE POINTS IF A POINT TYPE WAS SPECIFIED K = MOD( TYPE(J), 10 ) IF ( (K.GT.0) .AND. (K.LE.5) ) THEN CALL PGPOINT( N, X(1), Y(1,J), SYMBOL(K) ) END IF 80 CONTINUE C C Reset color to white C ICOLOR = 1 CALL PGSCI ( ICOLOR ) CALL PGEND RETURN END