	SUBROUTINE GRAPH(FUN,X1,X2,Y1,Y2)
	DIMENSION STORE(0/101,2),MAP(0/100),X(0/101)
	EQUIVALENCE (STORE(0,1),MAP(0))
	INTEGER DEFAULT
	DATA SLASH/"560 000 000 000/
	XMAX=AMAX1(X1,X2)
	XMIN=AMIN1(X1,X2)
	YMAX=AMAX1(Y1,Y2)
	YMIN=AMIN1(Y1,Y2)
	PRINT 300,SLASH,XMIN,XMAX,YMIN,YMAX
	IX=-(100.*XMIN)/(XMAX-XMIN)
	IY=-(50.*YMIN)/(YMAX-YMIN)
	Y=1.01*YMAX-.01*YMIN
	DO 101 I=0,101
	X(I)=((201-2*I)*XMIN+(2*I-1)*XMAX)/200.
101	STORE(I,2)=FUN(X(I),Y)
	DO 102 J=50,0,-1
	DEFAULT=' '
	IF(IY .EQ. J)DEFAULT='-'
	Y=((101-2*J)*YMIN+(2*J-1)*YMAX)/100.
	STORE(0,1)=STORE(0,2)
	STORE(0,2)=FUN(X(0),Y)
	DO 103 I=0,100
	M=DEFAULT
	IF(IX .EQ. I)M='!'
	STORE(I+1,1)=STORE(I+1,2)
	STORE(I+1,2)=FUN(X(I+1),Y)
	IF(STORE(I,1)*STORE(I+1,2) .LE. 0.)M='*'
	IF(STORE(I+1,1)*STORE(I,2) .LE. 0.)M='*'
103	MAP(I)=M
102	PRINT 301,MAP
	PRINT 302,SLASH
	RETURN
300	FORMAT('1',9X,A1,10X,'X= ',F,'/',F,';Y= ',F,'/',F,23X,'/')
301	FORMAT(11X,101A1)
302	FORMAT(10X,'/',101X,A1)
	END
	SUBROUTINE GRAPHX(FUN,X1,X2,Y1,Y2)
	INTEGER DEFAULT,MAP(0/100),Y(0/101)
	DATA SLASH/"560 000 000 000/
	XMAX=AMAX1(X1,X2)
	XMIN=AMIN1(X1,X2)
	YMAX=AMAX1(Y1,Y2)
	YMIN=AMIN1(Y1,Y2)
	PRINT 300,SLASH,XMIN,XMAX,YMIN,YMAX
	IX=-(100.*XMIN)/(XMAX-XMIN)
	IY=-(50.*YMIN)/(YMAX-YMIN)
	YB=1.01*YMIN-.01*YMAX
	DY=(YMAX-YMIN)/50.
	DO 101 I=0,101
	X=((201-2*I)*XMIN+(2*I-1)*XMAX)/200.
101	Y(I)=(FUN(X)-YB)/DY
	DO 102 J=50,0,-1
	DEFAULT=' '
	IF(IY .EQ. J)DEFAULT='-'
	DO 103 I=0,100
	MAP(I)=DEFAULT
	IF(IX .EQ. I)MAP(I)='!'
	IF(Y(I) .GE. J .AND. Y(I+1) .LE. J)MAP(I)='*'
103	IF(Y(I) .LE. J .AND. Y(I+1) .GE. J)MAP(I)='*'
102	PRINT 301,MAP
	PRINT 302,SLASH
	RETURN
300	FORMAT('1',9X,A1,10X,'X= ',F,'/',F,';Y= ',F,'/',F,23X,'/')
301	FORMAT(11X,101A1)
302	FORMAT(10X,'/',101X,A1)
	END
	SUBROUTINE PLOT(X,Y,N,X1,X2,Y1,Y2,IERR)
	INTEGER DEFAULT,XN
	DIMENSION X(N),Y(N),MAP(0/100)
	DATA SLASH/"560 000 000 000/
	XMAX=AMAX1(X1,X2)
	XMIN=AMIN1(X1,X2)
	YMAX=AMAX1(Y1,Y2)
	YMIN=AMIN1(Y1,Y2)
	PRINT 300,SLASH,XMIN,XMAX,YMIN,YMAX
	IX=-(100.*XMIN)/(XMAX-XMIN)
	IY=-(50.*YMIN)/(YMAX-YMIN)
	XB=1.005*XMIN-.005*XMAX
	XT=1.005*XMAX-.005*XMIN
	DX=(XMAX-XMIN)/100.
	YT=1.01*YMAX-.01*YMIN
	YTT=YT
	DO 102 J=50,0,-1
	DEFAULT=' '
	IF(J .EQ. IY)DEFAULT='-'
	DO 100 K=0,100
100	MAP(K)=DEFAULT
	IF(IX .GE. 0 .AND. IX .LE. 100)MAP(IX)='!'
	YB=((101-2*J)*YMIN+(2*J-1)*YMAX)/100.
	DO 101 I=1,N
	IF(Y(I) .GT. YT .OR. Y(I) .LE. YB)GO TO 101
	XN=(X(I)-XB)/DX
	IF(XN .GE. 0 .AND. XN .LE. 100)MAP(XN)='*'
101	CONTINUE
	YT=YB
102	PRINT 301,MAP
	PRINT 302,SLASH
	YT=YTT
	IERR=0
	DO 103 I=1,N
103	IF(Y(I) .GT. YT .OR. Y(I) .LT. YB .OR.
	1 X(I) .GT. XT .OR. X(I) .LT. XB)IERR=IERR+1
	RETURN
300	FORMAT('1',9X,A1,10X,'X= ',F,'/',F,';Y= ',F,'/',F,23X,'/')
301	FORMAT(11X,101A1)
302	FORMAT(10X,'/',101X,A1)
999	END
	SUBROUTINE PLOTZ(X,Y,Z,N,X1,X2,Y1,Y2,IERR)
	INTEGER DEFAULT,XN,Z(N)
	DIMENSION X(N),Y(N),MAP(0/100)
	DATA SLASH/"560 000 000 00/
	XMAX=AMAX1(X1,X2)
	XMIN=AMIN1(X1,X2)
	YMAX=AMAX1(Y1,Y2)
	YMIN=AMIN1(Y1,Y2)
	PRINT 300,SLASH,XMIN,XMAX,YMIN,YMAX
	IX=-(100.*XMIN)/(XMAX-XMIN)
	IY=-(50.*YMIN)/(YMAX-YMIN)
	XB=1.005*XMIN-.005*XMAX
	XT=1.005*XMAX-.005*XMIN
	DX=(XMAX-XMIN)/100.
	YT=1.01*YMAX-.01*YMIN
	YTT=YT
	DO 102 J=50,0,-1
	DEFAULT=' '
	IF(J .EQ. IY)DEFAULT='-'
	DO 100 K=0,100
100	MAP(K)=DEFAULT
	IF(IX .GE. 0 .AND. IX .LE. 100)MAP(IX)='!'
	YB=((101-2*J)*YMIN+(2*J-1)*YMAX)/100.
	DO 101 I=1,N
	IF(Y(I) .GT. YT .OR. Y(I) .LE. YB)GO TO 101
	XN=(X(I)-XB)/DX
	IF(XN .GE. 0 .AND. XN .LE. 100)MAP(XN)=Z(I)
101	CONTINUE
	YT=YB
102	PRINT 301,MAP
	PRINT 302,SLASH
	YT=YTT
	IERR=0
	DO 103 I=1,N
103	IF(Y(I) .GT. YT .OR. Y(I) .LT. YB .OR.
	1 X(I) .GT. XT .OR. X(I) .LT. XB)IERR=IERR+1
	RETURN
300	FORMAT('1',9X,A1,10X,'X= ',F,'/',F,';Y= ',F,'/',F,23X,'/')
301	FORMAT(11X,101A1)
302	FORMAT(10X,'/',101X,A1)
999	END

