      SUBROUTINE LABSET (SMIN,SMAX,SMIN1,SMAX1,SDEL,NDEC) 
C 
C     SUBROUTINE TO SET UP LABELING FOR AXIS PLOT.
C 
      DEL=SMAX-SMIN 
      DEL1=ALOG10(DEL)-1.0
      IF (DEL1.LT.0.0) DEL1=DEL1-1
      N=DEL1
      NS1=DEL/(1.0*10.0**N) 
      NS2=DEL/(2.0*10.0**N) 
      NS5=DEL/(5.0*10.0**N) 
      SDEL=10.0*10.0**N 
      IF (NS5.LE.10) SDEL = 5.0*10.0**N 
      IF (NS2.LE.10) SDEL = 2.0*10.0**N 
      IF (NS1.LE.10) SDEL = 1.0*10.0**N 
      SMIN1=SDEL*IFIX(SMIN/SDEL)
      SMAX1=SDEL*IFIX(SMAX/SDEL+1.0)
      IF (SMIN.LT.0.0) SMIN1=SDEL*IFIX(SMIN/SDEL-0.999) 
      IF (SMAX.LT.0.0) SMAX1=SDEL*IFIX(SMAX/SDEL) 
      IF (SDEL.LT.1.0) GO TO 810
      NDEC=-1 
      GO TO 820
 810  NDEC=ABS(ALOG10(SDEL)-0.999)
 820  RETURN
      END 
