!------------------------------------------------------------------------ ! LEVELS.GRAPHIC ! Procedure to define contour levels for multichannel image ! Variables defined in DEFINE.GRAPHIC ! R.Lucas 10-may-1990 !------------------------------------------------------------------------ on error return define real range expo mant define integer n1 n2 ! if spacing.lt.0 then return endif if (g_extrema.eq.0) then ! means no extrema section header /extrema endif if (spacing.eq.0) then let range = log10(g_max-g_min) let expo = int(range+20.)-21 let mant = range-expo-1 if (mant.lt.0.25) then let true_spacing 10**expo else if (mant.lt.0.60) then let true_spacing 2.*10**expo else if (mant.lt.0.90) then let true_spacing = 5.*10**expo else let true_spacing = 10**(expo+1) endif else let true_spacing = spacing endif let n1 max(-20,nint(g_min|true_spacing)) let n2 min(+20,nint(g_max|true_spacing)) if (n1.lt.0.and.n2.gt.0) then levels true_spacing*n1 to -0.95*true_spacing by true_spacing true_spacing to true_spacing*(n2+0.05) by true_spacing else let n1 max(n1,1) levels true_spacing*n1 to true_spacing*(n2+0.05) by true_spacing endif