如何在没有 X11 转发的情况下使用 gnuplot?

Tob*_*biR 1 linux gnuplot

我想在sftp的帮助下使用远程PC(linux下)的gnuplot,但抛出以下错误消息:

gnuplot: unable to open display ''
gnuplot: X11 aborted.
Run Code Online (Sandbox Code Playgroud)

有人可以帮助我如何在没有 X11 转发的情况下使用 gnuplot 吗?

mat*_*att 5

您将无法显示窗口,但您可以将终端设置为其他内容。

set term png
set out "test.png"
plot sin(x)
set out
Run Code Online (Sandbox Code Playgroud)

这会将 sin(x) 绘制为 png 文件。