Gruff with Better Pie, Scaling 9 comments

posted Tuesday, February 14, 2006 by topfunky

Thanks to patches from Paul Rogers, Dave Woodward, Frank Oxener, and others, Gruff has been enhanced!

Notable features:

  • Better scaling
  • Negative numbers
  • Pie graphs with numbers
  • Side stacked bar graphs scale properly
  • You can set a color with your data so the colors work right
sudo gem install gruff

9 comments

Leave a response

  • Caleb Buxton

    Thanks

  • Very nice. I have a feeling I will be using it.

  • If you are developing a charting package, I would highly recommend you start reading a blog about good chart design. I’d reccomend http://junkcharts.typepad.com which critiques graphics found in the media.

    A more comprehensive (and more expensive) resource is The Grammar of Graphics

  • topfunky

    Thanks for the link. I’ll check it out.

  • This is great. I’m going to be using the pie graphs in an upcoming app.

    Now if only Rmagick was easy to install on my windows dev box…

  • Shaun, before you use pie graphs in your app, google for pie charts bad and read some of the results.

  • I found Gruff easy to use, and the diagrams look nice. I used Gruff to make animated diagrams showing the use of work buffers in process simulations. The latest animation can be found at http://kallokain.blogspot.com/2006/02/variance-trap-part-4.html.

    I had to do one slight modification. I found no way to set a fixed scale. This is a problem when doing animations, because the scale changes from frame to frame. however, the problem was easily solved. I wrote a simple mixin that added accessors for scaling the Y-axis. It works like a chanrm. I’ll be happy to email it to you if you are interested.

  • topfunky

    That’s sweet!

    Many people have requested the ability to set the scale. I’ll add that in the next release.

    Did you use RMagick for the animation, or another program? It would be cool to build in that capability (an animated gif or something).

  • Right now the simulation software uses Gruff to write a sequence of images. A separate animation script executes ImageMagick commands directly. (The animation program just sort of happened while a friend and I were discussing the simulation system.)

    I plan to use RMagick to build the animation capabilities in, but I want to get the simulation engine a bit more stable first. It is still very much a prototype.

    Without Gruff there wouldn’t be a simulation engine, so I am very happy with it.

Your Comment

Nuby on Rails

Geoffrey Grosenbach / Ruby / Code / Graphics / Design / Rails / Merb / Javascript / CSS

Manufactured with

Subscribe

Subscribe (RSS)