      SUBROUTINE CHKEND
      IMPLICIT NONE
C
C ***      END THE CURRENT PLOT
C
      INCLUDE MATLAB$KOM:MATPLT.KOM
C
      REAL X, Y
C
C
      IF (PLTST) CALL GD13HI (13, X, Y)
      IF (X.NE.0) PLTST = .FALSE.
C
      RETURN
      END
