module IRuby
Public Class Methods
Source
# File lib/rbbt/util/iruby.rb, line 16 def self.ggplot(...) svg = R::SVG.ggplot(...) IRuby.html(svg) end
Source
# File lib/rbbt/util/iruby.rb, line 5 def self.img(file) IRuby.html("<img src='#{file}'/>") end
Source
# File lib/rbbt/util/iruby.rb, line 9 def self.plot(...) filename = Rbbt.iruby[rand(10000).to_s + ".png"] Open.mkdir File.dirname(filename) R::PNG.plot(filename, ...) img(filename) end