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

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top