Skip to content

Instantly share code, notes, and snippets.

@timrandg
Created January 11, 2012 05:28
Show Gist options
  • Save timrandg/1593204 to your computer and use it in GitHub Desktop.
Save timrandg/1593204 to your computer and use it in GitHub Desktop.
require 'rinruby'
collection = []
100.times{collection << rand(100)}
y = collection
x = (1..100).to_a
def point_plot(x,y,color)
r=RinRuby.new(:echo=>false)
r.y = y
r.x = x
r.eval <<EOF
library(ggplot2)
ggplot() + geom_point(aes(x,y), fill=#{color.inspect} )
EOF
end
point_plot(x,y,'grey')
sleep 10
point_plot(x,y,'grey')
sleep 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment