C****************************************************************
C* 								*
C*								*
C*	DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY *
C*	EITHER FOR THE CREATION OR FOR THE CLINICAL EFFICACY	*
C*	OF THIS PROGRAM. USERS MUST ASSUME FULL RESPONSIBILITY	*
C*	FOR ANY RESULTS OR DIAGNOSES OBTAINED FROM THE USE	*
C*	OF THIS PROGRAM. QUESTIONS ON THE EXECUTION OF THIS	*
C*	PROGRAM MUST BE REFERRED BACK TO THE ORIGINAL AUTHOR.	*
C*								*
C* AUTHOR:	SALLY FORSTER					*
C*		C/O DEPARTMENT OF NUCLEAR MEDICINE		*
C*		GUY'S HOSPITAL				*
C*		LONDON, ENGLAND					*
C*								*
C*		TEL: 01-407-7600 EXT 2583/4			*
C*								*
C****************************************************************
	SUBROUTINE FFPLOT(AINTER,AOV,AFIT,PC)
C*****AOV=FALSE CREATE X AXES IN AX AND PLOT SCALED CURVE1
C*****AOV=TRUE PLOTS CURVE2 SCALED BY CURVE1 AGAINST AX OVERLAID
	IMPLICIT INTEGER*2 (D-Z)
	IMPLICIT LOGICAL*1 (A)
	COMMON//SAVDES(256),CURVE1(512),CURVE2(512)
	COMMON/SCREEN/AX(512),CYSCAL,CXSCAL,K,ICOLC,CMA,CMI
	COMMON/WINDOW/FST,LST
	COMMON/FITBND/UP,LW
	COMMON/SET2X/FG,CG(13)
	COMMON/LINEAR/ALIN
	DIMENSION ICOLT(13)
	DATA ICOLT/15,52,27,13,7,26,60,5,59,31,56,8,6/
C*****COLOUR 0 = 0(BLACK),COLOUR 14 = "77(WHITE)
	DATA IAXCT,IMKCT/12,5/
C*****SET UP COLOUR FOR AXES&AXIS MARKS
	DATA IAXCL,IMKCL/8,7/
C*****IF ALL IGNORE ANY WINDOW
	ALL=.FALSE.
	IOF=0
C*****AOV TRUE FOR OVERLAY
	IF(AOV)GOTO 100
	ICOLC=1
C*****PREPARE SCREEN
	CALL CLEART
	DO 25 I=1,128
	AX(I)=(I-1)
25	AX(I+128)=0
C*****AXES
	CALL PLOTB(AX(1),AX(129),128,IAXCT,IAXCL)
	CALL PLOTB(AX(129),AX(1),128,IAXCT,IAXCL)
C*****1/4,1/2,3/4 Y AXES MARKERS
C*****"17437->31,31
	CALL PLOTB("400,"17437,2,IMKCT,IMKCL)
C*****"37477->63,63
	CALL PLOTB("400,"37477,2,IMKCT,IMKCL)
C*****"57537->95,95
	CALL PLOTB("400,"57537,2,IMKCT,IMKCL)
C*****SET UP X POINTS IN CURVE2
	CALL SETX(K)
	CMI=CMIN(1,ALL)
	CMA=CMAX(1,ALL)
	IF(CMA.LT.0.05)GOTO 30
	CYSCAL=126./CMA
30	CXSCAL=126./CURVE2(K)
	CALL LABSCR
	CALL LABGRP(IMKCT,IMKCL)
	DO 50 I=1,K
50	AX(I)=INT(CURVE2(I)*CXSCAL)+1
	GOTO 120
100	IF(PC.EQ.2)IOF=512
120	CALL DRAW(IOF,AINTER,AFIT,ICOLC,ICOLT(ICOLC))
	RETURN
	END
