Skip to content

Instantly share code, notes, and snippets.

@timrandg
Created January 10, 2012 09:26
Show Gist options
  • Save timrandg/1588052 to your computer and use it in GitHub Desktop.
Save timrandg/1588052 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_histogram(aes(rnorm(1000,10)), fill=#{color.inspect} )
EOF
end
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