     # 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

        interval  = interval *  [2.0, 1.25, 2.0, 2.0] [ index ]



def log_auto_ticks(data_low, data_high,
                   bound_low, bound_high,
                   tick_interval, use_endpoints = true):
    """Like auto_ticks(), but for log scales."""
    tick_goal = 15
    magic_numbers = [1, 2, 5]
    explicit_ticks = false

    if data_low<=0.0:
        return []

    if tick_interval != 'auto':
        if tick_interval < 0:
            tick_goal = -tick_interval
        else:
            magic_numbers = [tick_interval]
            explicit_ticks = true

    if data_low>data_high:
        data_low, data_high = data_high, data_low

    log_low = log10(data_low)
    log_high = log10(data_high)
    log_interval = log_high-log_low

    if log_interval < 1.0:
        # If less than a factor of 10 separates the data, just use the normal
        # linear approach
        return auto_ticks(data_low, data_high,

                          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 [Math.floor(log_low).,Math.ceil(log_high)]
                for multiplier in linspace(interval, 10.0, round(10.0/interval),
                                           endpoint=1)
                    tick = Math.exp(10, exp*multiplier)
                    if tick >= data_low and tick <= data_high:
                        ticklist.append(tick)
            if len(ticklist)<tick_goal+3 or explicit_ticks:
