最近学习OpenFOAM,在运行教程中的算例时出现错误:
set terminal qt 0 "gnuplot/gnuplot_script" line 1: unknown or ambiguous terminal type; type just 'set terminal' for a list
这是因为安装的gnuplot缺少一种终端类型:qt。这里可以将 “qt” 改成可使用的terminal,查看可使用的terminal:
gnuplot
>set terminal
安装缺少的terminal同样可以解决问题:
sudo apt-get install gnuplot-qt
然后重新运行程序即可。缺少其他terminal同理,例如缺x11就安装x11的包(sudo apt-get install gnuplot-x11)。
附录:
在gluplot网站可以获得更详细的信息,查看自己所用版本支持的terminal。
gnuplot homepagehttp://gnuplot.info/查看gluplot版本:
gnuplot --version
例如gnuplot5.5支持的terminal: Terminals (gnuplot.info)http://gnuplot.info/docs_5.5/Terminals.html
点击进去可以查看不同terminal的介绍和用法。