From: Ivo Roupa Date: 2010-05-11T23:51:20+09:00 Subject: Re: How to Plot Data? Jean-Julien Fleck wrote: > Hello, > >> I would like to plot some data from .txt or .csv files. Is it possible? >> And what gem do you use? I found rgnuplot but I can't use it... > > Try using ctioga: > > sudo gem install ctioga > > and then > > ctioga file.txt # -> plot column 2 versus column 1 > ctioga file.txt@1:4 # -> plot column 4 versus column 1 > ctioga file.txt @1:4 # -> plot column 2 and column 4 against column 1 > > Try ctioga --help to see all you can do or look at the doc: > http://sciyag.rubyforge.org/ctioga/doc/ > > NB: I don't think ctioga handles csv yet but a simple regexp could > change all your commas in spaces and you get a valid file. Or even > something like this should be enough. > > cat file.csv | tr ',' ' ' > file.txt > > NB2: ctioga is currently being reimplemented in ctioga2 which will > have some nice features as being able to be launched from a file > rather than from the command-line, but all the currently available > features of ctioga have not yet been implemented in ctioga2. Look at > http://ctioga2.rubyforge.org/doc/getting-started.html to see if it can > fit your needs. > > Cheers, Jean-Julien Fleck Thank you for your help. Cheers Ivo Roupa -- Posted via http://www.ruby-forum.com/.