## 10.3 Bar Graphs

                PROGRAM EX10_1
                DIMENSION X(9),Y(9),Y1(9),Y2(9),Y3(9)
                CHARACTER*60 CTIT,CBUF*24

                DATA  X/1.,2.,3.,4.,5.,6.,7.,8.,9./ Y/9*0./
               *     Y1/1.,1.5,2.5,1.3,2.0,1.2,0.7,1.4,1.1/
               *     Y2/2.,2.7,3.5,2.1,3.2,1.9,2.0,2.3,1.8/
               *     Y3/4.,3.5,4.5,3.7,4.,2.9,3.0,3.2,2.6/

                NYA=2700
                CTIT='Bar Graphs (BARS)'

                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL COMPLX
                CALL TICKS(1,'X')
                CALL INTAX
                CALL AXSLEN(1600,700)
                CALL TITLIN(CTIT,3)

                CALL LEGINI(CBUF,3,8)
                CALL LEGLIN(CBUF,'FIRST',1)
                CALL LEGLIN(CBUF,'SECOND',2)
                CALL LEGLIN(CBUF,'THIRD',3)
                CALL LEGTIT(' ')

                CALL SHDPAT(5)
                DO I=1,3
                  IF(I.GT.1) CALL LABELS('NONE','X')
                  CALL AXSPOS(300,NYA-(I-1)*800)

                  CALL GRAF(0.,10.,0.,1.,0.,5.,0.,1.)

                  IF(I.EQ.1) THEN
                    CALL BARGRP(3,0.15)
                    CALL BARS(X,Y,Y1,9)
                    CALL BARS(X,Y,Y2,9)
                    CALL BARS(X,Y,Y3,9)
                    CALL RESET('BARGRP')
                  ELSE IF(I.EQ.2) THEN
                    CALL HEIGHT(30)
                    CALL LABELS('DELTA','BARS')
                    CALL LABPOS('CENTER','BARS')
                    CALL BARS(X,Y,Y1,9)
                    CALL BARS(X,Y1,Y2,9)
                    CALL BARS(X,Y2,Y3,9)
                    CALL HEIGHT(36)
                  ELSE IF(I.EQ.3) THEN
                    CALL LABELS('SECOND','BARS')
                    CALL LABPOS('OUTSIDE','BARS')
                    CALL BARS(X,Y,Y1,9)
                  END IF

                  IF(I.NE.3) CALL LEGEND(CBUF,7)

                  IF(I.EQ.3) THEN
                    CALL HEIGHT(50)
                    CALL TITLE
                  END IF

                  CALL ENDGRF
                END DO

                CALL DISFIN
                END

Figure 10.1: Bar Graphs