      SUBROUTINE SAVFIL
      IMPLICIT NONE
C
C ***      SAVE PLOT DEFINITIONS
C
      INCLUDE MATLAB$KOM:SIZEPARMS.INC
      INCLUDE MATLAB$KOM:IOP.KOM
      INCLUDE MATLAB$KOM:MATPLT.KOM
      INCLUDE MATLAB$KOM:SAV.KOM
C
      CHARACTER*8 ICURS
      CHARACTER*4 NAME(32)
      INTEGER IPL, I, J, KK
C
      DATA ICURS / 'PLTSAV>>' /
C
C
      IPL = 45
      CALL DSSTRN (' PLEASE ENTER THE SAVE FILE NAME.', 1)
      CALL DSCURS (ICURS)
      READ (RTE, 15) NAME
15    FORMAT (32A1)
      CALL FILES (IPL, NAME)
      IF (FE.EQ.0) THEN
        WRITE (IPL, 25) PLTCNT, PLTMAX
25      FORMAT (2I2)
        DO 50 J = 1, 10
          IF (IPLTYP(J).GT.0 .AND. IPLTYP(J).LT.10) THEN
            WRITE (IPL, 30) IPLTYP(J)
30          FORMAT (I1)
            WRITE (IPL, 35) (ISAV(J,KK), KK = 1, 360)
            WRITE (IPL, 35) (ISAV(J,KK), KK = 361, XYSIZ)
35          FORMAT (360Z2)
          ENDIF
50      CONTINUE
        CALL FILES (-1*IPL, NAME)
      ENDIF
C
      RETURN
      END
