h24055
s 00001/00001/00094
d D 1.11 83/03/28 13:43:10 mjb 11 10
c 
e
s 00009/00011/00086
d D 1.10 83/03/15 13:09:34 mjb 10 9
c fixed bugs with labeling legends and calculating ranges
e
s 00001/00001/00096
d D 1.9 83/03/08 18:44:31 mjb 9 8
c 
e
s 00001/00001/00096
d D 1.8 83/03/08 17:04:33 mjb 8 7
c 
e
s 00052/00044/00045
d D 1.7 83/03/03 17:38:09 mjb 7 6
c fixed bugs with x/y plotting and logarithmic axis stuff
e
s 00002/00002/00087
d D 1.6 83/03/02 17:28:04 mjb 6 5
c 
e
s 00002/00002/00087
d D 1.5 83/03/02 00:12:39 mjb 5 4
c 
e
s 00007/00008/00082
d D 1.4 83/02/28 21:59:11 mjb 4 3
c lots and lots of changes for axis edit
e
s 00008/00006/00082
d D 1.3 83/02/28 16:28:16 mjb 3 2
c 
e
s 00001/00001/00087
d D 1.2 83/02/03 20:21:08 mjb 2 1
c fixed to include gattcom
e
s 00088/00000/00000
d D 1.1 83/01/20 11:10:26 tes 1 0
c date and time created 83/01/20 11:10:26 by tes
e
u
tes
mjb
U
t
T
I 1
D 3
subroutine gfmnmx (mxpnts, mnydta, mxydta) 
E 3
I 3
D 4
subroutine gfmnmx (mnydta, mxydta) 
E 4
I 4
subroutine gfmnmx
E 4
E 3
########################################################################
#                                                                      #
#          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: Output a graph to the current device                   #
#                                                                      #
#     Input Parameters:                                                #
#            None                                                      #
#                                                                      #
#     Output Parameters:                                               #
#            None                                                      #
#                                                                      #
#     Routines Called:                                                 #
#            None                                                      #
#                                                                      #
########################################################################
D 3
integer mxpnts
E 3
D 4
real mnydta, mxydta
E 4

integer itemp, i, j, k, kindex(5), icurve, klustr,
        kclskt
real datmin, datmax, xin, yin, xout, yout

D 2
include(`gphcom')
E 2
I 2
include(`gattcom')
E 2

   icurve = 0
   j = 1
I 7
D 10
   k = 1
E 10
I 10
   i = 1
E 10
E 7
I 3
   # initialize kindex to skip nopoint curves and curve used for indep data
E 3
D 10
   do i = 1, 5 {
E 10
I 10
   while (i <= 5) {
      if (bgadfg(1) == BIGY & i == bgadcv & bgaxis(1) != BIGP) {
	 i = i + 1
	 }
E 10
D 3
      if (bgddef(i) > 0) {   # initialize kindex to skip over nopoint curves
E 3
I 3
D 5
      if ((bgddef(i) > 0 & bgadfg(1) != BIGY) | 
	 (bgadfg(1) == BIGY & i != bgadcv)) {
E 5
I 5
D 6
      if (bgddef(i) > 0 ){ # & ((bgadfg(1) == BIGY & i != bgadcv) 
			   #  | bgadfg(1) == BIGN)) {
E 6
I 6
D 7
      if (bgddef(i) > 0 & ((bgadfg(1) == BIGY & i != bgadcv) 
			    | bgadfg(1) == BIGN)) {
E 6
E 5
E 3
	 kindex(j) = i
	 icurve = icurve + 1
         j = j + 1
E 7
I 7
D 8
      if (bgddef(i) > 0) {
E 8
I 8
D 9
      if (bgddef(i) > 1) {
E 9
I 9
      if (bgddef(i) > 0) {
E 9
E 8
D 10
         if (bgadfg(1) == BIGY & i == bgadcv & bgaxis(1) != BIGP) {
	    k = k + 1
	    }
	 else {
	    kindex(j) = k
	    icurve = icurve + 1
	    j = j + 1
	    k = k + 1
	    }
E 10
I 10
	 kindex(j) = i
	 icurve = icurve + 1
	 j = j + 1
E 10
E 7
	 }
I 10
      i = i + 1
E 10
      }

D 7
    k = (kindex(1)-1) * 75 + 1  # initialize min and max to some known value
D 4
    mnydta = zydata(k)
    mxydta = mnydta
E 4
I 4
    zdmin = zydata(k)
    zdmax = zdmin
E 7
I 7
    if (icurve > 0) {
       k = (kindex(1)-1) * 75 + 1  # initialize min and max to some known value
       zdmin = zydata(k)
       zdmax = zdmin
E 7
E 4

D 7
   if (bgstfg(1) == BIGN) {   # stacking is off 
      j = 1
      do i = 1, icurve {
	 k = kindex(i)
	 j = (k-1) * 75 + 1
	 itemp = bgddef(k)
I 3
	 if (bgadfg(1) == BIGY) itemp = maxpts
E 3
         call minmax (itemp, zydata(j), datmin, datmax)
D 4
	 mnydta = amin1 (mnydta, datmin)
	 mxydta = amax1 (mxydta, datmax)
E 4
I 4
	 zdmin = amin1 (zdmin, datmin)
	 zdmax = amax1 (zdmax, datmax)
E 4
         j = j + 75
E 7
I 7
      if (bgstfg(1) == BIGN) {   # stacking is off 
         j = 1
         do i = 1, icurve {
	    k = kindex(i)
	    j = (k-1) * 75 + 1
	    itemp = bgddef(k)
	    if (bgadfg(1) == BIGY & bgaxis(1) != BIGP) itemp = maxpts
            call minmax (itemp, zydata(j), datmin, datmax)
	    zdmin = amin1 (zdmin, datmin)
	    zdmax = amax1 (zdmax, datmax)
            j = j + 75
            }
E 7
         }
D 7
      }
E 7
I 7
      
      else {                    # stacking is on
         call stack (ON)
E 7
   
D 7
   else {                    # stacking is on
      call stack (ON)

      kclskt = 0
      do i = 1, icurve {
         j = kindex(i)
	 k = (j-1) * 75 + 1
	 klustr = 0
	 if (bgcvtp(j) == BAR & bgclus > 1) { # Bars and clustering
	    if (kclskt >= bgclus) kclskt = 0 
	    klustr = kclskt
	    kclskt = kclskt + 1
	    }
D 3
         do j = 1, mxpnts {
E 3
I 3
         do j = 1, maxpts {
E 3
	    xin = float(j)
	    yin = zydata(k)
D 3
	    itemp = j + mxpnts*klustr
	    call gpstck (mxpnts, zstack, itemp, xin, yin, xout, yout)
E 3
I 3
	    itemp = j + maxpts*klustr
	    call gpstck (maxpts, zstack, itemp, xin, yin, xout, yout)
E 3
D 4
	    mnydta = amin1 (mnydta, yout)
	    mxydta = amax1 (mxydta, yout)
E 4
I 4
	    zdmin = amin1 (zdmin, yout)
	    zdmax = amax1 (zdmax, yout)
E 4
	    k = k + 1
	    }
E 7
I 7
         kclskt = 0
         do i = 1, icurve {
            j = kindex(i)
	    k = (j-1) * 75 + 1
	    klustr = 0
	    if (bgcvtp(j) == BAR & bgclus > 1) { # Bars and clustering
	       if (kclskt >= bgclus) kclskt = 0 
	       klustr = kclskt
	       kclskt = kclskt + 1
	       }
            do j = 1, maxpts {
	       xin = float(j)
	       yin = zydata(k)
	       itemp = j + maxpts*klustr
	       call gpstck (maxpts, zstack, itemp, xin, yin, xout, yout)
	       zdmin = amin1 (zdmin, yout)
	       zdmax = amax1 (zdmax, yout)
	       k = k + 1
	       }
            }
         # Re-initialize stack array
         call stack (ON)
E 7
         }
D 7
      # Re-initialize stack array
      call stack (ON)
E 7
      }
D 11

E 11
I 11
   if (zdmin > 0.0) zdmin = 0.0  # Set default min to zero if greater than
E 11
   return
end
E 1
