更改终端类型时如何更改 gnuplot 搜索的默认路径?

How to change the default path gnuplot searches when changing terminal type?

我是 HPC 系统的用户。我现在想在我的目录 /home/username 下安装新版本的 gnuplot。我安装成功了,但是现在默认的终端类型是qt。我现在想把它改成x11。命令 set terminal x11 不工作,错误消息是:

Expected X11 driver: /home/app/gnuplot-5.0.6/libexec/gnuplot/5.0/gnuplot_x11 Exec failed: No such file or directory See 'help x11' for more details

这很奇怪,因为我在

中安装了 gnuplot

/home/username/app/gnuplot-5.0.6/

并且

中有一个 gnuplot_x11

/home/username/app/gnuplot-5.0.6/libexec/gnuplot/5.0/gnuplot_x11

有没有办法告诉 gnuplot 它在错误的路径中搜索?有没有办法将 x11 终端设置为默认终端?

非常感谢!


更新:

我可以设置--with-qt=no,现在默认变成了wxt。现在我可以使用 set terminal x11:

gnuplot> set terminal x11
Terminal type set to 'x11'
Options are ' nopersist enhanced'

我不太明白为什么。

您可以通过设置 GNUPLOT_DRIVER_DIR 环境变量来更改 gnuplot 在其中查找 gnuplot_x11 驱动程序的目录。来自 help x11:

The gnuplot outboard driver, gnuplot_x11, is searched in a default place chosen when the program is compiled. You can override that by defining the environment variable GNUPLOT_DRIVER_DIR to point to a different location.