http://nubyonrails.com/pages/gruff
#!/usr/bin/ruby
require 'rubygems'
require 'gruff'
g = Gruff::Line.new
g.title = "My Graph"
g.data("Apples", [1, 2, 3, 4, 4, 3])
g.data("Oranges", [4, 8, 7, 9, 8, 9])
g.data("Watermelon", [2, 3, 1, 5, 6, 8])
g.data("Peaches", [9, 9, 10, 8, 7, 9])
g.labels = {0 => '2003', 2 => '2004', 4 => '2005'}
g.write('my_fruity_graph.png')cheat sheets.
$ cheat gruff( add new | see all )
- updated sheets

- readme
- rspec
- boyfriend
- girlfriend
- loose_weight
- nils
- administrateme
- okay
- bartleby
- xpath
- git
- sprintf
- shoulda
- nonsense
- lucene_query_syntax
Advertisement