Sha256: 69cb3b683b238a462a8699c0cc011c6571f5c293dea81a12c199cd9c10112a97

Contents?: true

Size: 885 Bytes

Versions: 140

Compression:

Stored size: 885 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

    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

    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

140 entries across 140 versions & 1 rubygems

Version Path
rbbt-util-5.43.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.42.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.41.1 test/rbbt/util/R/test_plot.rb
rbbt-util-5.41.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.40.5 test/rbbt/util/R/test_plot.rb
rbbt-util-5.40.4 test/rbbt/util/R/test_plot.rb
rbbt-util-5.40.3 test/rbbt/util/R/test_plot.rb
rbbt-util-5.40.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.39.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.38.1 test/rbbt/util/R/test_plot.rb
rbbt-util-5.38.0 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.16 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.15 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.14 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.13 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.12 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.11 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.10 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.9 test/rbbt/util/R/test_plot.rb
rbbt-util-5.37.8 test/rbbt/util/R/test_plot.rb