Drawing a pie chart

         +------------------------------------------------------+
         | CALL  IGPIE (X0,Y0,RADIUS,N,VALUES,CHOPT,IAO,IAS,IAC) |
         +------------------------------------------------------+
                                  
Action: This routine draws a graph in form of a pie chart. Parameter Description:
X0
X coordinate of the center of the pie chart.
Y0
Y coordinate of the center of the pie chart.
RADIUS
Radius of the pie chart.
N
Number of entries in the array VALUES
VALUES
Array of dimension N containing the values determining the size of the slices in the pie.
CHOPT
Character variable specifying the combination of options desired:
'C'
Colours array is present.
'L'
Alphanumeric labels are required (see section [more info]).
'O'
Offset array is present.
'N'
The label of each slice will be the corresponding numeric value in array VALUES.
'P'
The label of each slice will be in expressed in percentage.
'S'
Style array is present.
'H'
Force the labels size to be the current character height. Without this option the labels size is computed automatically.
'R'
Draw the labels aligned on the radius of each slice.
IAO
Array of dimension N containing offsets of the corresponding slice in percentage of the radius.
IAS
Array of dimension N containing the interior style index for every slice.
IAC
Array of dimension N containing the colour index for every slice.
       Example of PIE CHART drawing (see result on figure
                            [more info]
                                  
      program  pie
      dimension v(8),iao(8),ias(8)
      data v /1.,1.8,2.9,1.,1.8,2.9,1.,1.8/
      data iao /0,0,0,20,0,0,20,0/
      data ias /205,295,245,244,254,245,244,245/
      call start('pie',12.,9.)
      call isclip(0)
      call igbox(0.,12.,0.,9.)
      call igset('BORD',1.)
      call igpie(3.,6.,2.,8,v,'OSN',iao,ias,0)
      call igpie(9.,6.,2.,8,v,'OSP',iao,ias,0)
      call igset('TXAL',23.)
      call igset('CHHE',0.3)
      call itx(3.,3.,'CHOPT = ''OSN''')
      call itx(9.,3.,'CHOPT = ''OSP''')
      call itx(6.,2.,'IAO = 0,0,0,20,0,0,20,0')
      call itx(6.,1.,'IAS = 205,295,245,244,254,245,244,245')
      call finish
      end


                                                                  

Figure: Examples of IGPIE

[PIE]