Ruby 1.9 compatible plotting / graphic library?

懵懂的女人 提交于 2019-12-23 02:47:14

问题


I feel like I have a simple desire that no one can satisfy: I want to be able to graph a set of points, and I am using Ruby 1.9.2.

I would like to use Gruff or Scruffy, since these seem to be the easiest to use. However, they both rely on rmagick, and it seems that many other libraries do to. Rmagick isn't compatible with Ruby 1.9 though. (not to mention, I've read that you should just stay away from it anyways...I would enjoy hearing reasons)

I am using wxRuby for a project, but in the future I will be needing simple graphs in other places, such as online and just command line scripts. Therefore, if someone has a solution for wxRuby, that is great, but an all-encompassing solution would be even better.

Thank you!

P.S. I've seen gnuplot, but it would be a bit overkill. If that's my best option, I can live with that. I've also seen RGL, but I didn't look too long at it.

EDIT: Just to add, neither Gruff or Scruffy have been updated since August 2009, and I would like to find something that is at least semi-maintained. SVG::Graph looks very powerful, but hasn't been updated since Sept. '09. There is a fork of it on rubygems though which says it is 1.9 compatible, maybe I will try that if I can't get Scruffy or Gruff to play nice.


回答1:


There may be some wx lib you could use.

Barring that I use rmagick with 1.9 (what's your platform?)

and it appears there have been some updates to those gems, though not new releases in awhile.

http://ruby-toolbox.com/categories/graphing.html



来源:https://stackoverflow.com/questions/3723497/ruby-1-9-compatible-plotting-graphic-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!