12
votes

i am following the great machine learning course given by Andrew Wu from Stanford. When I executed plot function in ex5 file, the octave cli command line reports the following warning:

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'.

The calculation works but all the graphs were not drew by plot. I tried set terminal qt or others like x11, but none of them worked. The solution in this post Can't find x11 terminal in gnuplot Octave on Mac OS does not work either.

my mac is Yosemite 10.10.3 my gnuplot is

G N U P L O T
Version 5.0 patchlevel 1    last modified 2015-06-07 
...
Terminal type set to 'unknown'

my XQuartz 2.7.7 (xorg-server 1.15.2)

Anyone knows how to fix? Thanks!

5
You have a gnuplot binary that lacks the necessary aqua terminal for mac. Wherefrom have got it? - Karl

5 Answers

12
votes

Try reinstalling gnuplot --with-qt, e.g.

brew reinstall gnuplot --with-qt
10
votes

1) Open up terminal and try running

gnuplot

2) In gnuplot, run the command

set terminal

This should list all your available terminal types.

3) In octave, pick an available gnuplot terminal type and run setenv(). For example this could be

setenv('GNUTERM','qt')
setenv('GNUTERM','x11')

Hope this helps someone!

4
votes

I faced the same issue last night. The simplest solution I could find was to set terminal to qt from Octave.

setenv('GNUTERM','qt')

Now you can call plot as usual.

0
votes

for me, what fixed it was:

brew install Caskroom/cask/aquaterm
brew upgrade gnuplot --with-aquaterm --with-qt4
0
votes

Try this: sudo apt install gnuplot-qt. It worked for me.