With the latest 5.4 and 5.5 versions under Linux, if a "set terminal <terminal-type>" is used in .gnuplot, this terminal type is set but not acknowledged. This may have to do with the "interactive" variable which is checked in file "term.c". It seems the terminal is set twice, with the default terminal type and interactive is true, and with the one in .config with interactive set to false; in earlier versions, it also happened twice, but both with the terminal type specified in .gnuplot.</terminal-type>
Diff:
What do you mean by "not acknowledged"? Would your issue be solved by placing the command "show terminal" in the ./gnuplot file immediately following the "set terminal"?
I am not following how interactive/non-interactive is relevant here. Are you saying that gnuplot run from a script acts differently than gnuplot run from the command line?
Well I was used to setting the terminal type in .gnuplot, and in earlier versions, a message was given showing that it was set to that type. With the newer versions, gnuplot does only give a message that the terminal type has been set to a default type rather than the one specified in .gnuplot. This had confused me for a while. So apparently the terminal type is set twice, first with the default type and the integer variable "interactive" at true (showing the terminal type) and next with the one in the .gnuplot file, with integer variable "interactive" at false (not showing the terminal type). When gnuplot is executing the commands in .gnuplot this may indeed be viewed as not interactive, and "show terminal" indeed helps. I think in earlier versions of gnuplot 1) the terminal type was set to a default and a message is shown, 2) the terminal type may be set in .gnuplot but no message is shown, and 3) after reading .gnuplot, the final selected terminal type is shown again. This is what I meant with "acknowledged". This latter behavior was helpful.