Well, I think you probably need to trim the data down a bit. Could
you maybe build up some averages over time periods and feed just those
averages to Gruff?
Well, I think you probably need to trim the data down a bit. Could
you maybe build up some averages over time periods and feed just
those averages to Gruff?
James Edward G. II
What kind of graph? How big is the graph? Think about what kind of
resolution is meaningful – the default is only 800 pixels wide and you
can’t graph sub-pixel values
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:453:in data' from c:/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:15 70:ineach_with_index’
from
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:in each' from c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:ineach_with_index’
from
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:in
`data’
from main.rb:27
However if I feed the fastercsv data into an array then into gruff it should work, as feeding a whole array that I’ve written out by hand
into gruff works. If you see my logic here, it should work, no?
Not really, well I could but I’m trying to compare it with doing it in a
similar program such as GNU Plot, plus there are sometimes
irregularities in the data which I’d like to show if possible.
On a second look the error I’m getting is a gruff related one.
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:943:in larger_than _max?': undefined method>’ for [“1\t8877”]:Array (NoMethodError)
from
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:453:in data' from c:/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:15 70:ineach_with_index’
from
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:in each' from c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:ineach_with_index’
from
c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.4/lib/gruff/base.rb:443:in
`data’
from main.rb:20
line 20’s where the array gets pushed into the graph.
However if I feed the fastercsv data into an array then into gruff it should work, as feeding a whole array that I’ve written out by hand
into gruff works. If you see my logic here, it should work, no?
No, because reading a CSV produces a table, i.e. an array of arrays,
something like: