Sha256: f70e727f09c0473d224d0f70a37847550d6d9bd486c20ef9e988ba23f8ce6d9d

Contents?: true

Size: 927 Bytes

Versions: 296

Compression:

Stored size: 927 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_helper.rb')
require 'rbbt/util/R'
require 'rbbt/util/R/plot'

class TestRPlot < Test::Unit::TestCase
  def __test_ggplotgif

    Log.severity = 0
    x = R.eval_a 'rnorm(100, 0, 1)'
    data = TSV.setup(x, "Num~#:type=:single#:cast=:to_f")

    data.add_field "Val" do |k,v|
      k
    end

    R::GIF.eog(data, (0..10).to_a.collect{|i| 100.0 / 10**i}, <<-EOF, nil, nil, :delay => 100)
rbbt.require('reshape')
ggplot(data) + geom_density(bw=frame.value, aes(x=Val))
    EOF

  end

  def test_gif

    Log.severity = 0
    x = R.eval_a 'rnorm(100, 0, 1)'
    data = TSV.setup(x, "Num~#:type=:single#:cast=:to_f")

    data.add_field "Val" do |k,v|
      k
    end

    R::GIF.eog_plot(data, (0..10).to_a.collect{|i| 100.0 / 10**i}, <<-EOF, 400, 400, :delay => 10)
rbbt.require('reshape')
plot(density(data$Val, bw=frame.value))
    EOF

  end
end

Version data entries

296 entries across 296 versions & 1 rubygems

Version Path
rbbt-util-5.28.9 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.8 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.7 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.6 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.5 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.4 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.2 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.1 test/rbbt/util/R/test_plot.rb
rbbt-util-5.28.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.13 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.12 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.11 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.10 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.9 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.8 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.7 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.6 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.5 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.4 test/rbbt/util/R/test_plot.rb
rbbt-util-5.27.3 test/rbbt/util/R/test_plot.rb