SciRuby没有绘制条形图

时间:2016-03-18 12:27:55

标签: sciruby

我没有看到SciRuby代码的输出。我希望看到输出

expected output

但是我得到的输出就像下面的屏幕截图

output I get

代码:

require 'nyaplot'
include Nyaplot

plot = Plot.new
bar = plot.add(:bar, [:a, :b, :c], [3,4,5])
plot

日志:

➜  Ruby iruby notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook`... continue in 5 sec. Press Ctrl-C to quit now.
[I 17:41:40.578 NotebookApp] Serving notebooks from local directory: /home/abhimanyuaryan/Public/RoR/Ruby
[I 17:41:40.578 NotebookApp] 0 active kernels 
[I 17:41:40.578 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 17:41:40.578 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Gtk-Message: Failed to load module "pantheon-filechooser-module"

(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(firefox:19417): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Gtk-Message: Failed to load module "canberra-gtk-module"
[I 17:41:55.360 NotebookApp] 302 GET / (127.0.0.1) 0.57ms
[I 17:42:00.302 NotebookApp] Creating new notebook in 
[I 17:42:02.225 NotebookApp] Kernel started: b4ef1b18-a8ac-40ea-a833-fb520b24d52f
[I 17:44:02.269 NotebookApp] Saving file at /Untitled1.ipynb
[I 17:46:02.257 NotebookApp] Saving file at /Untitled1.ipynb
[I 17:48:02.257 NotebookApp] Saving file at /Untitled1.ipynb

1 个答案:

答案 0 :(得分:0)

$ gem install nyaplot
$ gem install gnuplotrb

为我解决了这个问题。感谢reply

John Wood