tags:

views:

45

answers:

2

I have a ruby script I've written using Gruff to produce graphs. These are simple bar charts, and they've worked fine many times. Now, for one particular set of points I'm getting

c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.6/lib/gruff/line.rb:109:in draw': Non-conforming drawing primitive definitionInf' @ draw.c/DrawImage/3140 (Magick::ImageMagickError) from c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.6/lib/gruff/line.rb:109:in draw' from c:/ruby/lib/ruby/gems/1.8/gems/gruff-0.3.6/lib/gruff/base.rb:487:inwrite'

(then stack trace into my code)

I certainly don't have "Inf" in my code. I've taken a look into Gruff, but it's going to be the devil to get my head wrapped around Gruff source enough to track this one down.

I'll work on narrowing things down, but thought I'd post to see if this is familiar to anyone, or anyone has pointers on how to track down what has thrown Gruff for a loop.

thanks for any help...

A: 

maybe try a different version of rmagick/imagemagick? [or try it on linux...]? or ask in the rmagick forum they responded once to me

rogerdpack
A: 

OK, apparently there's something magic about just asking the question on StackOverflow :). This will be the second time I've answered my own question in short order.

In this case the problem is that one of the values in the array I'm passing in is "Infinity"

Oh well... for the next one to make the same mistake, here's the answer.

Mike Cargal