我正在学习斯坦福大学Andrew Wu教授的伟大的机器学习课程。当我在ex5文件中执行plot函数时,octave cli命令行报告以下警告:
set terminal aqua enhanced title "Figure 1" size 560 420 font "*,6" dashlength 1
^
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list
WARNING: Plotting with an 'unknown' terminal.
No output will be generated. Please select a terminal with 'set terminal'.
计算可以工作,但所有的图形都不是通过绘图绘制的。我尝试设置终端qt或其他类似x11,但它们都不起作用。这篇文章Can't find x11 terminal in gnuplot Octave on Mac OS中的解决方案也不起作用。
我的mac是Yosemite 10.10.3,我的gnuplot是
G N U P L O T
Version 5.0 patchlevel 1 last modified 2015-06-07
...
Terminal type set to 'unknown'
我的服务器2.7.7 (xorg- XQuartz 1.15.2)
有人知道怎么修复吗?谢谢!
发布于 2017-09-18 03:27:15
尝试重新安装gnuplot
--with-qt
,例如
brew reinstall gnuplot --with-qt
发布于 2016-07-02 02:28:58
1)打开终端,尝试运行
gnuplot
2)在gnuplot中,运行命令
set terminal
这应该会列出所有可用的终端类型。
3)在octave中,选择一个可用的gnuplot终端类型并运行setenv()。例如,这可能是
setenv('GNUTERM','qt')
setenv('GNUTERM','x11')
希望这对某些人有帮助!
发布于 2015-08-21 02:22:19
我昨晚也遇到了同样的问题。我能找到的最简单的解决方案是将终端从Octave设置为qt
。
setenv('GNUTERM','qt')
现在您可以像往常一样调用plot
。
https://stackoverflow.com/questions/32086405
复制相似问题