Sample code snippet for gruff bar drawing

V

Victor Reyes

[Note: parts of this message were removed to make it a legal post.]

Do anyone has a code snippet showing how to define/create a bar chart using
*gruff*?

Thanks

Victor
 
D

David Mullet

Victor said:
Do anyone has a code snippet showing how to define/create a bar chart
using
*gruff*?

Thanks

Victor

A brief contrived example:

require 'gruff'
g = Gruff::Bar.new
g.title = 'Widget Sales 2008'
g.data('Number of Widgets Sold', my_values_array)
g.minimum_value = 0
g.maximum_value = 10000
g.marker_count = 10
g.labels = my_labels_hash
g.write('widget_sales.jpg')

David

http://rubyonwindows.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top