RubyConf: Graphics with Ruby

Posted by Nick Sieger Fri, 20 Oct 2006 20:18:00 GMT

Geoff Grosenbach is waxing on pagefuls of numbers condensed into a small, tidy graph that increases the amount of information you can communicate on a page.

Topfunky fox
The cartoon fox makes his second appearance of the day in one of Geoff’s sparklines

It is in our hands, the hands of the programmer, to show designers what the range of visual representation capabilities are.


  • Scruffy -- SVG graphs, no dependencies (i.e., RMagick)
  • GNUPlot -- the old standby
  • MRPlot -- scientific plots
  • PNG -- line and font drawing in pure ruby from Seattle.rb
  • Gruff -- depends on RMagick
  • Sparklines -- depends on RMagick
  • [Ploticus and RRD were mentioned during the talk as well]


  • Automatically generating image mastheads with a font mask, a gradient and a cloud image showing through the mask
  • -- plotting bars on a timeline showing happy hours in Portland
  • “Scene graph” -- rendering multiple layers of images/icons on the filesystem into a composite graphics “scene”
  • -- rendered image with multiple components that allows you to circumvent cross-site or crippled javascript issues
  • In a Rails controller:
    • Generate and cache (with caches_page) an image with text
    • Register a new mime type and use responds_to {|type| type.jpg { ... } }
  • Requisite reference to Edward Tufte


  • Comparisons -- show two competing trendlines on a graph
  • Multivariate analysis -- stock chart rendering
  • Content is king -- be judicious

Posted in  | Tags ,  | no comments | no trackbacks



Use the following link to trackback from your own site: