## 10.3 Pie Charts

                PROGRAM EX10_2
                DIMENSION XRAY(5)
                CHARACTER*60 CTIT,CBUF*40
                DATA XRAY/1.,2.5,2.,2.7,1.8/

                CTIT='Pie Charts (PIEGRF)'
                NYA=2800

                CALL SETPAG('DA4P')
                CALL DISINI
                CALL PAGERA
                CALL COMPLX
                CALL AXSLEN(1600,1000)
                CALL TITLIN(CTIT,2)

                CALL LEGINI(CBUF,5,8)
                CALL LEGLIN(CBUF,'FIRST',1)
                CALL LEGLIN(CBUF,'SECOND',2)
                CALL LEGLIN(CBUF,'THIRD',3)
                CALL LEGLIN(CBUF,'FOURTH',4)
                CALL LEGLIN(CBUF,'FIFTH',5)

          C     Selecting shading patterns
                CALL PATCYC(1,7)
                CALL PATCYC(2,4)
                CALL PATCYC(3,13)
                CALL PATCYC(4,3)
                CALL PATCYC(5,5)

                DO I=1,2
                  CALL AXSPOS(250,NYA-(I-1)*1200)
                  IF(I.EQ.2) THEN
                    CALL LABELS('DATA','PIE')
                    CALL LABPOS('EXTERNAL','PIE')
                  END IF

                  CALL PIEGRF(CBUF,1,XRAY,5)

                  IF(I.EQ.2) THEN
                    CALL HEIGHT(50)
                    CALL TITLE
                  END IF
                  CALL ENDGRF
                END DO
                CALL DISFIN
                END

Figure 10.2: Pie Charts