# File easy_vtk.rb, line 803
  def colorbar( options={} )
    unless @lookupTable
      raise "color lookup table has not been created"
    end
    scalarBar = Vtk::ScalarBarActor.new
    scalarBar.SetLookupTable( @lookupTable )
    options.each{ |key, val|
      case key
      when 'orientation'
        case val
        when 'horizontal'
          scalarBar.SetOrientationToHorizontal
        when 'vertical'
          scalarBar.SetOrientationToVertical
        else
          raise "value of option['orientation'] (=#{val}) is invalid"
        end
      when 'height'
        scalarBar.SetHeight( val )
      when 'width'
        scalarBar.SetWidth( val )
      when 'position'
        if ! Array === val || val.length != 2
          raise "value of option['position'] must be Array whose length is 3"
        end
        scalarBar.GetPositionCoordinate.SetValue *val
      else
        raise "option (#{key}) is invalid"
      end
    }
    @ren.AddActor( scalarBar )
    return nil
  end