h61191
s 00007/00003/00066
d D 1.4 83/03/16 17:50:40 mjb 4 3
c put in flag to tell which viewport in for y tic labeling
e
s 00001/00000/00068
d D 1.3 83/03/10 19:33:25 mjb 3 2
c 
e
s 00003/00003/00065
d D 1.2 83/03/02 22:22:39 mjb 2 1
c 
e
s 00068/00000/00000
d D 1.1 83/03/02 17:51:02 mjb 1 0
c date and time created 83/03/02 17:51:02 by mjb
e
u
mjb
tes
U
t
T
I 1
subroutine graph7

SHORTINT kindex, gindex(6), mgrpos(64), i, j, k, mfile
D 4
real rpos(4)
E 4
I 4
real rpos(4), ytdism
E 4

include(`gattcom')

data gindex / 1, 9, 17, 29, 41, 57/
data mgrpos /   0,  50,  0, 100,  50, 100,   0, 100,
	        0, 100, 50, 100,   0, 100,   0,  50,
		0, 100, 50, 100,   0,  50,   0,  50,
               50, 100,  0,  50,   0,  50,  50, 100,
               50, 100, 50, 100,   0, 100,   0,  50,
		0,  50, 50, 100,  50, 100,  50, 100,
                0,  50,  0,  50,  50, 100,   0,  50,
		0, 100,  0, 100,  0,  81,  21,  100/

   call gpini (device)  # Initialize device
   call clrini

   # Set index into graph position array based on graph type
   kindex = gindex(mfrmat)
   if (action == ANNOTATE | action == MOVExLEGEND) kindex = 61

   j = 1
   for (i = 1; i <= multfg; i=i+1) {
      mfile = YES
      if (multfg > 1) {        # we are doing a multi page graph
         mfile = NO
	 if (mfname(j) != NUL) {
	    call rdwrit (BINARYxREAD, mfname(j), zlegxy, GPHCOMxSIZE)
	    mfile = YES
	    }
         }

     call gpdflt         # Initialize Plot to default
     do k = 1, 4 {
        rpos(k) = mgrpos(kindex)
        kindex = kindex + 1
        }
      call grpos (rpos(1), rpos(2), rpos(3), rpos(4))
D 4
   
E 4
I 4

      ytdism = 1.                             # Set y tic distance multiplier
      if (rpos(2) - rpos(1) <= 50.)           # base on viewport and pass to
         ytdism = 2.                          # grapha (for hardware char sizes)

E 4
      if (mfile == YES) {    # We have a file to output
         if (bctype == PIE) {
	    call graph8              # Set pie attributes overlay
            call graph9              # Make a pie overlay
            }
         else if (bctype != TEXT) {
D 2
            call grph10              # Set graph attributes overlay
            call grph11              # Make graph axes and titles overlay
            call grph12              # Output a graph overlay
E 2
I 2
D 4
            call grapha              # Set graph attributes overlay
E 4
I 4
            call grapha (ytdism)     # Set graph attributes overlay
E 4
            call graphb              # Make graph axes and titles overlay
            call graphc              # Output a graph overlay
E 2
            }
	 if (action != ANNOTATE & ((anobuf(1)+anobuf(2)) != NUL))
	    call dsptxt (anobuf)
         }
      j = j + 14
I 3
      call gpzmov (1, 0 ,0)          # Do Plot move to dump Vector List
E 3
      }

   if (action != ANNOTATE & action != MOVExLEGEND) {
      if (device == CRT) call prmnw8
      else {
         call gpdev (CRT)
         call clrini
         }
      }

return
end
E 1
