      SUBROUTINE SMALLTICK(XX1,XX2,YY1,YY2,XLOW,XHIGH,SPAN,
     C                     XTLEN,TYPE)
C
C PRODUCE SMALL TICK MARKS ALONG INDEPENDENT AXIS (TIME)
C AT USER DEFINED INTERVALS IN DAYS.
C
      INTEGER*4 TYPE
      REAL*8 XLOW,XHIGH,XVAL,VAL,YR1,YR2,FRAC1,FRAC2
C
      Y1 = YY1 + XTLEN/2.
      Y2 = YY2 - XTLEN/2.
      IF (TYPE.GT.-5) THEN
       XDIFF = REAL((XHIGH-XLOW)*365.25D0)
      ELSE
       XDIFF = REAL(XHIGH-XLOW)
      END IF
      YDIFF = YY2 - YY1
      ISTOP = NINT(XDIFF/SPAN) + 1
      XVAL = XLOW
      DO 50 I=1,ISTOP
       XLIN = XX1 + (XX2-XX1) * REAL((XVAL-XLOW)/(XHIGH-XLOW))
       IF (XVAL.GT.XHIGH) GOTO 50
       CALL MGOLINE(XLIN,YY1,XLIN,Y1)
       CALL MGOLINE(XLIN,YY2,XLIN,Y2)
       IF (TYPE.GT.-5) THEN
        YR1 = DBLE(INT(XVAL))
        VAL = XVAL + DBLE(SPAN) / DBLE(DAYS(XVAL))
        IF (INT(VAL).GT.INT(XVAL)) THEN
         YR2 = YR1 + 1.D0
         FRAC1 = (YR2 - XVAL) * DBLE(DAYS(XVAL))
         FRAC2 = DBLE(SPAN) - FRAC1 
         VAL = YR2 + FRAC2 / DBLE(DAYS(YR2))
        ENDIF
        XVAL = VAL
       ELSE
        XVAL = XVAL + SPAN
       END IF
   50 CONTINUE
C
      RETURN
      END
