Sha256: a4edf1461111352325313d21d0b7de30b707753d4f8462d4e3ea4fbf132e04ae

Contents?: true

Size: 388 Bytes

Versions: 11

Compression:

Stored size: 388 Bytes

Contents

# = Image
# This example shows how to include an image 
$:.unshift(File.dirname(__FILE__)+"/../../lib")
require 'rubyvis'

img_url="fixtures/tipsy.gif"

vis = pv.Panel.new().width(200).height(200);

dot=vis.add(pv.Image)
    .data([1,2,3,4,5,6])
    .bottom(lambda {|d| d*30})
    .left(lambda {|d| d*30} )
    .width(9)
    .height(9)
    .url(img_url)
    
vis.render()
puts vis.to_svg

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rubyvis-0.7.0 examples/1_basic/image.rb
rubyvis-0.6.1 examples/1_basic/image.rb
rubyvis-0.6.0 examples/1_basic/image.rb
rubyvis-0.5.2 examples/1_basic/image.rb
rubyvis-0.5.1 examples/1_basic/image.rb
rubyvis-0.5.0 examples/1_basic/image.rb
rubyvis-0.4.1 examples/1_basic/image.rb
rubyvis-0.4.0 examples/1_basic/image.rb
rubyvis-0.3.6 examples/1_basic/image.rb
rubyvis-0.3.5 examples/1_basic/image.rb
rubyvis-0.3.4 examples/1_basic/image.rb