Looking for a charting library in Ruby

…searching the RAA came up with ruby-gdchart:

http://raa.ruby-lang.org/list.rhtml?name=ruby-gdchart

Is this what folks are using? I’m just looking to make some fairly
simple line charts to illustrate the effects of fuzzy logic membership
functions:

http://ai-app-prog.rubyforge.org/

Thanks,

tom

···


Tom Copeland tom@infoether.com
InfoEther

Hi Tom,

Tom Copeland wrote:

…searching the RAA came up with ruby-gdchart:

http://raa.ruby-lang.org/list.rhtml?name=ruby-gdchart

Is this what folks are using?

I have been using it for a while and it has fit all my requirements.
I have created my own class to save some typing.(Attached).

Then you can do something like this:

require ‘graph’
def graph_txt(txtfile,labelcolumn,datacolumn,delimeter=" ")

 data=Array.new

 labels=Array.new

 File.new(txtfile).each do |lines| 

     lines.split("\n").each do |line| 

        data << line.split(delimeter)[datacolumn] 

        labels << line.split(delimeter)[labelcolumn]

     end   

 end   

 data.map! {|x| x.to_i }



 g=Graphs.new 

                       options={  

                                       "title"  => "Time",

                                       "type" => "BAR3D",

                                       "name"  =>  "1",

                                       "data"=> data,

                                       "labels"=> labels,

                                       "ytitle"=> "Y",

                                       "xtitle"=> "X",

                                       "dir"   =>"/home/rbermejo",

                                       "xlabel_spacing" => 0

                                   }

                  

             g.create(options)

end

graph_txt(“txtfile”,0,1)

-rodrigo

graph.rb (4.19 KB)

···

$ ls /usr/bin
ls
ruby
$

http://ai-app-prog.rubyforge.org/

Thanks,

tom

Very nice, thanks!

Tom

···

-----Original Message-----
From: Bermejo, Rodrigo [mailto:rodrigo.bermejo@ps.ge.com]

http://raa.ruby-lang.org/list.rhtml?name=ruby-gdchart

Is this what folks are using?

I have been using it for a while and it has fit all my requirements.
I have created my own class to save some typing.(Attached).