h39453
s 00000/00011/00105
d D 1.2 83/03/10 19:33:36 mjb 2 1
c 
e
s 00116/00000/00000
d D 1.1 83/03/02 17:52:21 mjb 1 0
c date and time created 83/03/02 17:52:21 by mjb
e
u
mjb
tes
U
t
T
I 1
subroutine graph8
########################################################################
#                                                                      #
#          THIS MATERIAL IS CONFIDENTIAL AND IS FURNISHED UNDER        #
#          A WRITTEN LICENSE AGREEMENT.  IT MAY NOT BE USED,           #
#          COPIED OR DISCLOSED TO OTHERS EXCEPT IN ACCORDANCE          #
#          WITH THE TERMS OF THAT AGREEMENT.                           #
#                                                                      #
#          COPYRIGHT (C) 1982 GRAPHIC SOFTWARE SYSTEMS INC.            #
#          ALL RIGHTS RESERVED.                                        #
#                                                                      #
#     Function: Set pie chart attributes and output titles etc         #
#                                                                      #
#     Input Parameters:                                                #
#            None                                                      #
#                                                                      #
#     Output Parameters:                                               #
#            None                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
SHORTINT istitl
integer i, j, k, type, explod, fill, numpts, color
REAL rtemp1, rtemp2

include(`gattcom')

# Assumptions:
#   - the common block 'piecom' has been updated and properly set for
#     outputting a pie chart

# * specify all Title attributes
do i = 1, 3 {
   gfont(i) = bptfnt(i)
   zchrsz(i) = bptsiz(i)
   gcolor(i) = bptclr(i)
   }

CALL TITLAT (gfont(1), zchrsz(1), gcolor(1), 0., 2)

rtemp1 = 100.0
rtemp2 = amax1 (zchrsz(1), 7.0) # Initialize rtemp2 to Title size

# check for a TITLE string
if (istitl (bptitl) > 0) {
   call byttoi (bptitl, i)
   rtemp1 = rtemp1 - rtemp2 - rtemp2*.30
   call title (50., rtemp1, i, ntpray)
   rtemp1 = rtemp1 - zchrsz(2) - rtemp2*.40
   }
else {
   rtemp2 = amax1(zchrsz(2), 7.0) # If no title treat Subtitle as Title    
   rtemp1 = rtemp1 - rtemp2 - rtemp2*.30
   }

CALL TITLAT (gfont(2), zchrsz(2), gcolor(2), 0., 2)

# check for a sub-title
if (istitl (bpsitl) > 0) {
   call byttoi (bpsitl, i)
   call title (50., rtemp1, i, ntpray)
   }

# * specify Label attributes
type = 1
if (bvalfg(1) == BIGP) type = 0
call pieatt (type, gfont(3), zchrsz(3), gcolor(3))

# obtain the number of data points
if (bpddef > 0) {
   numpts = bpddef

   # convert pack pie data to real
   call cvreal (numpts, bpdata, zydata)

   # initialize the index array
   do i=1, numpts
      ntpray(i) = i

   if (bpsrfg(1) == BIGY) {
      i = bpsrod(1)  # sort order flag
      call gzsort (numpts, zydata, ntpray, i)
      }

   # set slice attributes via ntpray array
   do i=1, numpts {
      explod = 0
      k = ntpray(i)
      j = (k-1)*2 + 1
      if (bpexfg(j) == BIGY) explod = 1
      fill = bpslfl(k)
      color = bpslcl(k)
      call pieslc (i, explod, fill, color)
      }

   # set the tic mark color
   rtemp1 = 0.0
   color = bpticl
   call linatt(color, 1, rtemp1)
   }

D 2
if (bpbrfg(1) == BIGY) {

   # * Outline the graph
   color = bpbrcl
   rtemp1 = bpbrwd - 1
   rtemp1 = rtemp1 / 10.0
   call linatt (color, 1, rtemp1)
   call frame (0.,100.,0.,100.)
   call linatt (1, 1, 0.)
   }

E 2
return
end
E 1
