1

I want to be able to do 2 things:

  1. Have a gui for ruby from which I can run some scripts/calculations.
  2. Display the results via a chart.

Results will just be in a simple array. It would be best to have that all in the gui so it can function like a normal program.

Any help would be greatly appreciated.

Thanks!

Edit: I forgot to mention, the charts can be simple line charts. Nothing fancy. But they need to be able to display an array of results as large as say 100,000 points.

user1594138
  • 1,003
  • 3
  • 11
  • 20
  • I haven't found anything good yet. I've found a ton of gui's but I've been unable to solve how to display charts in them. – user1594138 Sep 13 '12 at 10:29
  • Sounds like you want a "matlab lite." Does this happen to be linux, or can you run linux in a VM? – Mark Thomas Sep 13 '12 at 16:08
  • The closest out-of-the box solution I can find is [matplotlib](http://matplotlib.org/) which is exactly what you want, except python. Though unfortunately the future of the toolkit is uncertain. – Mark Thomas Sep 13 '12 at 16:23
  • You may want to experiment with a combination of irb and [tioga](http://tioga.rubyforge.org/), [ctioga2](http://ctioga2.rubyforge.org/), the [gnuplot gem](https://github.com/rdp/ruby_gnuplot), or some other command-line plotting library. – Mark Thomas Sep 13 '12 at 16:33
  • Thanks for the help. I'm on windows. I'm thinking of switching to c++ for the heavier non-scripting stuff. – user1594138 Sep 13 '12 at 17:36

2 Answers2

1

I should probably keep shut on this topic because I lack the practical experiense, but I would suggest treating 1. and 2. as completley separate problems. The hint for 2. can be found eg. in the SO thread Ruby: building a plot of function, while with 1., I had moderate success with Ruby GTK.

This does not constitute a full answer to your question, and you should not flag it as accepted answer. I posted it due to lack of interest and/or will to answer from others. I am still waiting for the big pro to come and teach me and the asker how to do it.

Community
  • 1
  • 1
Boris Stitnicky
  • 12,444
  • 5
  • 57
  • 74
  • Thanks for the answer. That's kind of what I had done but then I'm unable to put the 2 together. For example I have a library that outputs svg code, so from there I can save it to an html file or I guess create it automatically and open it via a browser. That might be what I'll go with for now. – user1594138 Sep 13 '12 at 14:27
  • I'm actually thinking of using localhost, and maybe a high quality javascript graphing library. And simply making ruby write to that environment, that then gets updated in a browser. So I'll get a pretty nice looking viewing environment for results from my scripts. But no good gui of course. – user1594138 Sep 13 '12 at 14:28
  • 1
    Still, I would like to see your question truly answered, to the point that I consider putting a bounty on it :) – Boris Stitnicky Sep 13 '12 at 14:41
0

It looks like ruby-gsl does what you want. You can call plot functions from right within irb. See the screenshots for an idea of how you would interact with it.

Mark Thomas
  • 37,131
  • 11
  • 74
  • 101