        SUBROUTINE GRAFIN(X,Y,LFLAG)
        IMPLICIT NONE
        LOGICAL *2 LFLAG
        REAL*4 X,Y
        INTEGER IERR
C
C       DISPLAY AND READ THE GRAPHICS CURSOR AND RETURN ITS POSITION
C       IN WORLD COORDINATES.
C
        INCLUDE DIGLIB$KOM:PLTCOM.PRM
        INCLUDE DIGLIB$KOM:PLTSIZ.PRM
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
