       SUBROUTINE LB_TICS(LUS,ARG1)
C
C----------------------------------------------------------------------
C.IDENTIFICATION: Subroutine LB_TICS
C.LIBRARY:        XASGRAPH
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 13 Oct 93 - Prototype
C.PURPOSE:        LaBeller TICS 
C.SYNTAX:         CALL LB_TICS(LUS,ARG1)
C.PARAMETERS:     INTEGER LUS(2)     : the graphics logical units
C                 REAL ARG1          : tics size in NDC
C----------------------------------------------------------------------
C
C      routine for tic plotting based on axis setup in LB_AXIS
C      based on the "Labeller" program (L.Chiappetti, 1986, 1989)
C
       IMPLICIT  INTEGER (A-Z)
       INTEGER LUS(*),K
       REAL    ARG1
       INCLUDE 'labco.inc'
       INCLUDE 'labc1.inc'
       INCLUDE 'voscommon.inc'
C
       CHARACTER WORK*15,SMALL*14,LARGE*14
       REAL      HEIGHT(2),X,Y
       IF(.NOT.DEFINED)THEN
         IERR=910 !AXIS NOT DEFINED
         GOTO 9999
       ENDIF
C????  by definition in NDC (ie as fraction of viewport)
       HEIGHT(1)=ARG1
C
C      prepare "large" tics for log scale
       IF(.NOT.LIN)THEN
         HEIGHT(2)=1.5*HEIGHT(1)
       ENDIF
       IF(LIN)THEN
         DO 10 I=1,NSTEP
           IF(XAXIS)THEN
             X=COORD(I)
             Y=ORIGIN
             CALL Y_MOVE(LUS,X,Y         )
             CALL Y_DRAW(LUS,X,Y         +HEIGHT(1))
           ELSE
             X=ORIGIN
             Y=COORD(I)
             CALL Y_MOVE(LUS,X         ,Y)
             CALL Y_DRAW(LUS,X         +HEIGHT(1),Y)
           ENDIF
 10      CONTINUE
       ELSE
        DO 20 I=1,NSTEP
        IF(VALUES(I).NE.-1.)K=2 ! large tics
           IF(XAXIS)THEN
             X=COORD(I)
             Y=ORIGIN
             CALL Y_MOVE(LUS,X,Y         )
             CALL Y_DRAW(LUS,X,Y         +HEIGHT(K))
           ELSE
             X=ORIGIN
             Y=COORD(I)
             CALL Y_MOVE(LUS,X         ,Y)
             CALL Y_DRAW(LUS,X         +HEIGHT(K),Y)
           ENDIF
        IF(VALUES(I).NE.-1.)K=1 ! small tics
 20     CONTINUE
       ENDIF
       RETURN
C
C-->   tentatively store "labler" error code in VOS common
 9999  VOSCOMMON_ERROR=9999
       VOSCOMMON_SYSTEMERROR=IERR
       write(*,*)' debug LB_TICS exiting with ',ierr
       END
