clbustos/rubyvis — Issue #8: Rubyvis::Scale and x.ticks()
Author: GreyHands
Created: 2011-10-28 17:49:41+00:00
State: open

My data is:

#
#
#
#
#

I set scale with:

x = pv.Scale.linear($jobs_data, lambda {|d| d.x}).range(0, w)
y = pv.Scale.linear($jobs_data, lambda {|d| d.y}).range(0, h)

then, when I try to add a Rule with x.ticks() I got:

/opt/local/lib/ruby/gems/1.8/gems/rubyvis-0.5.0/lib/rubyvis/internals.rb:224:in `floor': Infinity (FloatDomainError)
from /opt/local/lib/ruby/gems/1.8/gems/rubyvis-0.5.0/lib/rubyvis/internals.rb:224:in `log_floor'
from /opt/local/lib/ruby/gems/1.8/gems/rubyvis-0.5.0/lib/rubyvis/scale/quantitative.rb:382:in `ticks'

I verified that the same error happens every time x or y have always the same value.

e.g.

This gives the same error:
x = 1 , y = 1
x = 1 , y = 2
x = 1 , y = 3
x = 1 , y = 4
x = 1 , y = 5

This one doesn't give error:
x = 1 , y = 1
x = 2, y = 2
x = 1 , y = 3
x = 1 , y = 4
x = 1 , y = 5