Created
January 11, 2012 05:28
-
-
Save timrandg/1593204 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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