Ruby:构建函数图
在 Ruby 下构建函数图的最简单方法是什么?对于特殊的图形库有什么建议吗?
更新: 仅在 Windows 下:-(
更新 2: 发现以下 gem 作为迄今为止的最佳解决方案 https://github.com/clbustos/rubyvis
What's the easiest way to build a plot of a function under Ruby? Any suggestions as to the special graphical library?
update: under windows only :-(
update 2: found the following gem as a best solution so far https://github.com/clbustos/rubyvis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
gnuplot
是一个可能的选择吗?:Is
gnuplot
a possible option?:万一其他人遇到这个问题,我可以使用以下代码来使用 gnuplot:
需要 rubygems 并为 gnuplot 使用正确的 gem 名称对我来说是关键。
In case anyone else stumbles over this, I was able to use gnuplot using the following code:
Requiring rubygems and using the correct gem name for gnuplot was the key for me.
这是我的常用图形库: SVG::Graph
This is my go-to graphing library: SVG::Graph
我真的很喜欢 tioga。它可以在乳胶中生成令人难以置信的高质量、可供出版的图表。
I really like tioga. It can produce incredibly high quality, publication-ready graphs in latex.
使用 SVG::Graph ::行像这样:
use SVG::Graph::Line like this:
有微软Excel。
如果是这样,Ruby on Windows 博客可能会很有用,问题也是如此 标记了 win32ole 和 ruby。
There's Microsoft Excel.
If so, the Ruby on Windows blog may be useful, as are questions tagged win32ole and ruby.