     # so we subtract a small, index dependent amount from each difference
     # to force correct ordering.
     sh    = shape( differences )
-    small = 2.2e-16 * arange( sh[1] ) * arange( sh[0] )[:,newaxis]
-    small = small[::-1,::-1] #reverse the order
+    #small = 2.2e-16 * arange( sh[1] ) * arange( sh[0] )[:,newaxis]
+    #small = small[::-1,::-1] #reverse the order
     differences = differences - small
 
     # ? Numeric should allow keyword "axis" ? comment out for now

                          tick_interval,
                          use_endpoints = false)

    else if log_interval < (tick_goal+1)/2 or explicit_ticks:
        # If there's enough space, try to put lines at the magic number multipliers
        # inside each power of ten

        # Try each interval to see how many ticks we get
        for interval in magic_numbers:
            ticklist = []
            for exp in range(int(Math.floor(log_low)), int(Math.ceil(log_high))):
                for multiplier in linspace(interval, 10.0, round(10.0/interval),
                                           endpoint=1):
                    tick = 10**exp*multiplier
                    if tick >= data_low and tick <= data_high:
                        ticklist.append(tick)
            if len(ticklist)<tick_goal+3 or explicit_ticks:

        if (endlog-startlog) % interval == 0.0:
            expticks = concatenate([expticks, [endlog]])
        return 10**expticks
"""

#-------------------------------------------------------------------------------
#  Compute the best lower and upper axis bounds for a range of data:
#-------------------------------------------------------------------------------

auto_bounds = ( data_low, data_high, tick_interval ) ->
    """ Calculates appropriate upper and lower bounds for the axis from
        the data bounds and the given axis interval.

        The boundaries  hit either exactly on the lower and upper values
        or on the tick mark just beyond the lower and upper values.
    """
    return [calc_bound( data_low,  tick_interval, false ),
             calc_bound( data_high, tick_interval, true  ) ]

#-------------------------------------------------------------------------------
#  Compute the best axis endpoint for a specified data value:
#-------------------------------------------------------------------------------

calc_bound =  ( end_point, tick_interval, is_upper ) ->
    """ Finds an axis end point that includes the value *end_point*.

    If the tick mark interval results in a tick mark hitting directly on the
