	SUBROUTINE GRAFIN(X,Y,LFLAG)
	LOGICAL LFLAG
C
C	DISPLAY AND READ THE GRAPHICS CURSOR AND RETURN ITS POSITION
C	IN WORLD COORDINATES.
C
	LOGICAL*1 LOGX, LOGY
	COMMON /PLTCOM/ UX0, UDX, UY0, UDY, LOGX, LOGY
	COMMON /PLTSIZ/ XVSTRT, YVSTRT, XVLEN, YVLEN
C
C	GET CURSOR POSITION IN VIRTUAL COORDINATES.
C
	CALL GSCRSR(X,Y,LFLAG,IERR)
	IF (IERR .NE. 0) RETURN
	X = (X-XVSTRT)*UDX/XVLEN + UX0
	IF (LOGX) X = 10.0**X
	Y = (Y-YVSTRT)*UDY/YVLEN + UY0
	IF (LOGY) Y = 10.0**Y
	RETURN
	END
