next up previous contents index
Next: SUBROUTINE SHADE Up: Description of Plotting Previous: SUBROUTINE SCALE

SUBROUTINE SCALG

 

 SCALG calculates a scaled minimum and increment factor similar to  SCALE but uses the log (actually alog10(abs(val)+1.e-38)) of the input array. See also SCALE and LGLIN. SCALG selects xm and dx so that the plotted x values may be computed using the following formula such that if alog10(abs(x)+1.e-38)=xm then xplotted=0 and if alog10(abs(x)+1.e-38)=xlen*dx+xm then xplotted=xlen.

    xplotted = ( alog10(abs(x)+1.e-38) - xm ) / dx
CALL SCALG (x,xlen,n,k,ix,xm,dx)

x     (R): array of data points from which scale is determined
xlen  (R): length 
n     (I): number of data points in x (n>1)
k     (I): use every first (k=1) value, second (k=2) value, etc.
           normally k=1
ix    (I): first data point index for x (normally ix=1)
xm    (R): contains smoothed minimum after the call (returned)
dx    (R): contains smoothed increment after call (returned)



David Long
Wed Jun 12 10:34:11 MDT 1996