def range(*arguments)
      if (arguments.size>0) 
        @r = arguments.dup
        if (@r.size==0)
          @r = [-Infinity, Infinity];
        elsif (@r.size == 1)
          @r = [@r[0], @r[0]]
        end
        @i=(@r.size-1).times.map do |j|
          Rubyvis::Scale.interpolator(@r[j], @r[j + 1]);
        end
        return self
      end
      @r
    end
def range(*arguments)
      if (arguments.size>0) 
        @r = arguments.dup
        if (@r.size==0)
          @r = [-Infinity, Infinity];
        elsif (@r.size == 1)
          @r = [@r[0], @r[0]]
        end
        @i=(@r.size-1).times.map do |j|
          Rubyvis::Scale.interpolator(@r[j], @r[j + 1]);
        end
        return self
      end
      @r
    end
Sets or gets the output range. This method can be invoked several ways:

 <p>1. <tt>range(min, ..., max)</tt>

 <p>The range may be specified as a series of numbers or colors. Most
 commonly, two numbers are specified: the minimum and maximum pixel values.
 For a color scale, values may be specified as {@link Rubyvis.Color}s or
 equivalent strings. For a diverging scale, or other subdivided non-uniform
 scales, multiple values can be specified. For example:

   .range("red", "white", "green")

 <p>Currently, only numbers and colors are supported as range values. The
 number of range values must exactly match the number of domain values, or
 the behavior of the scale is undefined.

 <p>2. <tt>range()</tt>

 <p>Invoking the <tt>range</tt> method with no arguments returns the current
 range as an array of numbers or colors.
 :call-seq:
   range(min,...,max)
   range()