Lua错误:“未设置Gnuplot终端”

在LuaJIT或者Torch REPL中,当我输入下面命令:

require 'gnuplot'
gnuplot.figure()

会出现错误“未设置Gnuplot终端”。

我尝试了使用 gnuplot.setterm() 来猜测一些参数,例如 'x11' 和 'qt',但是却收到错误“gnuplot不支持此术语”。有哪里可以获取gnuplot可用的终端模拟器/图形后端列表呢?或者说,这些错误是否表明其他问题?

点赞
用户1546029
用户1546029

原文:

It turns out that you get this error if you don't have the [Gnuplot executable](http://www.gnuplot.info/download.html) installed.

I didn't check for this problem before because gnuplot.lua (v. 5.1) has an error check for the case of that executable being unavailable - on line 145 - but for some reason it failed to catch the problem.

中文翻译:

事实证明,如果未安装[Gnuplot可执行文件](http://www.gnuplot.info/download.html),则会出现此错误。

之前我没有检查过这个问题,因为gnuplot.lua(v.5.1)对于可执行文件不可用的情况有错误检查 - 在第145行 - 但出于某些原因它未能捕捉到问题。
2015-05-04 03:04:19