4
votes

In LuaJIT or in the Torch REPL, I run the commands require 'gnuplot' gnuplot.figure() and I get the error "Gnuplot terminal is not set".

I tried using gnuplot.setterm() with some guesses such as 'x11' and 'qt' as arguments, but get the error "gnuplot does not seem to have this term". Is there somewhere I can get a list of terminal emulators/graphics backends available to gnuplot? Or alternatively, are these errors indicative of some other problem?

1
What are you doing? What code/script do you refer to? - Christoph
Unfortunately not; the lua gnuplot library's set term function does give the functionality of the 'set terminal' command from the documentation you provided, but when I try to set the terminal to options from the list of terminals, I get a 'terminal not found' error. - sudo-nim
I'll have to come back and troubleshoot this when I'm more experienced with Lua. I'll post the solution at then. - sudo-nim

1 Answers

4
votes

It turns out that you get this error if you don't have the Gnuplot executable 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.