 
       interval = best_mantissa * ideal_magnitude
 
-      console.log("AS.gi: mantissas = #{candidate_mantissas}")
-      console.log("          errors = #{errors}")
-      console.log("        mantissa = #{best_mantissa}")
-      console.log("        interval = #{interval}")
+#       console.log("  AS.gi: mantissas = #{candidate_mantissas}")
+#       console.log("            errors = #{errors}")
+#       console.log("          mantissa = #{best_mantissa}")
+#       console.log("         magnitude = #{ideal_magnitude}")
+#       console.log("          interval = #{interval}")
 
       return clamp(interval, @get_min_interval(), @get_max_interval())
 

      start_factor = Math.floor(data_low / interval)
      end_factor   = Math.ceil(data_high / interval)
      factors = arange(start_factor, end_factor + 1)
      return factors.map((f) -> return f * interval)
  
  # FIXME Hopefully we won't actually need this.
  class SingleIntervalScale extends AbstractScale

      super(intervals.map((interval) ->
        return new SingleIntervalScale(interval)))

  # This is a simple one-size-fits-all scale, suitable for decimal,
  # non-time-based quantities.
#   global_scale = new AdaptiveScale([1.0, 2.0, 5.0])

  HUNDRED_MILLIS = 100.0
  ONE_SECOND = 1000.0
  ONE_MINUTE = 60.0 * ONE_SECOND
  ONE_HOUR = 60 * ONE_MINUTE
  ONE_DAY = 24 * ONE_HOUR

  global_scale = new CompositeScale([
    # Sub-second.
    # FIXME 500-ms intervals are not formatted correctly.
    new AdaptiveScale([1.0, 2.0, 5.0], 10.0, 0.0, HUNDRED_MILLIS),

    # Seconds, minutes.
    new AdaptiveScale([1.0, 2.0, 5.0, 10.0, 15.0, 20.0, 30.0], 60.0,
                      ONE_SECOND, ONE_MINUTE),

    # Hours.
    new AdaptiveScale([1.0, 2.0, 4.0, 6.0, 8.0, 12.0], 24.0,
                      ONE_HOUR, ONE_HOUR),
 
    # Days and above.
    new AdaptiveScale([1.0, 2.0, 5.0], 10.0, ONE_DAY, Infinity),
  ])

  auto_interval_temp = (data_low, data_high) ->
