How to use gnuplot without X11 forwarding?

gnuplot, linux

Solution

You won't be able to display a window, but you can set the terminal to be something else.

set term png
set out "test.png"
plot sin(x)
set out

That will plot sin(x) to a png file.

Problem

I would like to use gnuplot of a remote pc (under linux) with the help of sftp, but the following error message is thrown: ``` gnuplot: unable to open display '' gnuplot: X11 aborted. ``` Could anybody help me how to use gnuplot without X11 forwarding?

Original source