clbustos/rubyvis — Issue #9: Scale::Log: ticks() doesn't work as expected
Author: mohawkjohn
Created: 2011-11-07 21:18:21+00:00
State: open

If I use `xy = pv.Scale.linear(0, 1000).range(40, 400)`, then I can later draw rules using `data xy.ticks(5)`.

But if I change it like so, `xy = pv.Scale.log(1,1000).range(40,400)`, then `data xy.ticks(5)` gives an error message. Instead I have to do `data [1,10,100,1000]`.

Here is the error:

/usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/scale/log.rb:30:in `ticks': wrong number of arguments (1 for 0) (ArgumentError)
from /home/jwoods/phenolog/paper/paper.rb:150:in `block (3 levels) in plot_correlation'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark/shorcut_methods.rb:18:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark/shorcut_methods.rb:18:in `block in mark_method'
from /home/jwoods/phenolog/paper/paper.rb:149:in `block (2 levels) in plot_correlation'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark/shorcut_methods.rb:18:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark/shorcut_methods.rb:18:in `block in mark_method'
from /home/jwoods/phenolog/paper/paper.rb:134:in `block in plot_correlation'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark.rb:470:in `instance_eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark.rb:470:in `execute'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark.rb:459:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/rubyvis-0.5.0/lib/rubyvis/mark/panel.rb:17:in `initialize'
from /home/jwoods/phenolog/paper/paper.rb:94:in `new'
from /home/jwoods/phenolog/paper/paper.rb:94:in `plot_correlation'
from paper/plot_corr.rb:12:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:86:in `eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:86:in `block in eval_script'
from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
from /usr/local/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:84:in `eval_script'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:111:in `create_svg'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:98:in `create_handle'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/lib/sciruby/plotter.rb:21:in `initialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/bin/sciruby-plotter:12:in `new'
from /usr/local/lib/ruby/gems/1.9.1/gems/sciruby-0.1.3/bin/sciruby-plotter:12:in `'
from /usr/local/bin/sciruby-plotter:19:in `load'
from /usr/local/bin/sciruby-plotter:19:in `

'

Looks like this is related to the other two open issues.