def nice
      return self if @d.size!=2
      start=@d.first
      _end=@d[@d.size-1]
      reverse=_end<start
      min=reverse ? _end : start
      max = reverse ? start : _end
      span=max-min
      
      return self if(!span or span.infinite?)
      
      step=10**((Math::log(span).quo(Math::log(10))).round-1)
      @d=[(min.quo(step)).floor*step, (max.quo(step)).ceil*step]
      @d.reverse if  reverse
      @l=@d.map {|v| @f.call(v)}
      self
    end
def nice
      return self if @d.size!=2
      start=@d.first
      _end=@d[@d.size-1]
      reverse=_end<start
      min=reverse ? _end : start
      max = reverse ? start : _end
      span=max-min
      
      return self if(!span or span.infinite?)
      
      step=10**((Math::log(span).quo(Math::log(10))).round-1)
      @d=[(min.quo(step)).floor*step, (max.quo(step)).ceil*step]
      @d.reverse if  reverse
      @l=@d.map {|v| @f.call(v)}
      self
    end
"Nices" this scale, extending the bounds of the input domain to
 evenly-rounded values. Nicing is useful if the domain is computed
 dynamically from data, and may be irregular. For example, given a domain of
 [0.20147987687960267, 0.996679553296417], a call to <tt>nice()</tt> might
 extend the domain to [0.2, 1].

 This method must be invoked each time after setting the domain.