Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: Plotting with an 'unknown' terminal. No output will be generated. Please select a terminal with 'set terminal'

Tags:

macos

gnuplot

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!

like image 362
Loro Tashi Avatar asked Aug 19 '15 04:08

Loro Tashi


People also ask

What is the default terminal in gnuplot?

News: the default terminal is set to 'wxt' terminal instead of the traditional 'windows' terminal. The default terminal can be controlled by setting the 'GNUTERM' environmental variable or by putting 'set term windows|wxt' into gnuplot.

What is terminal Gnuplot?

Gnuplot provides dozens of terminals to display plots or export them into files (see terminals() to get a list of enabled terminals on your platform).


2 Answers

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!

like image 56
Kevin Lee Avatar answered Nov 16 '22 01:11

Kevin Lee


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

brew reinstall gnuplot --with-qt
like image 45
kenorb Avatar answered Nov 16 '22 02:11

kenorb