Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed 12.04 along with Windows 7 and also installed gnuplot 4.6.0.

When I type gnuplot on the terminal, I am getting the error message:

Terminal type set to unknown.

When I tried plot sin(x), the graph does not appear on the screen.

However, I am able to make a postscript file. I tried set terminal 'x11', system responds with:

unknown or ambiguous terminal. 

Please help me solve this problem.

share|improve this question
Is this on Windows or Ubuntu? Strange that the x11 term is not there. Have you tried typing "set term" to get a list of installed terminals? – Lee Phillips Aug 10 '12 at 14:38
This post solved the problem for me:… – jotrocken Mar 20 '13 at 15:05

Jotrocken's comment was spot on -- copying from the answer he linked to:

Just add gnuplot-x11 package via the terminal (CTRL+ALT+T):

sudo apt-get install gnuplot-x11

or via the software-center:

Install via the software center

It solved my plotting problems for GNUPlot in Octave!!!

share|improve this answer

I've had a similar problem with Ubuntu 10.04 64 bit. When gnuplot starts up, there's no default terminal type ("Terminal type set to 'unknown'"). If I then do

set term xterm

which is in the list returned by

set term

and then try to plot any function, all I get is gobbledygook. I've tried uninstalling gnuplot completely (via apt-get purge) from my computer and installing only gnuplot-x11, and doing a manual install from the gnuplot-4.6.0 package using the ./configure --with-x option with success. The only "solution" I've found is to use

set term dumb

and put up with a text-based graphic. This is ok for just checking the shape of a simple function. For more complicated functions, I've resorted to using the epslatex terminal and gv to view the output.

Is there anyone out there who's found a better and more complete solution?

share|improve this answer

xterm will be good for a while, but if you require GNU octave too, then you certainly require gnuplot to detect x11 terminal. There are two ways which I hope must resolve it for you:

  1. Edit configure script in the .gz downloaded from gnuplot site to meet some positive value in X11_APPDEFAULTS_DIR variable.
  2. You could just do apt-get install glib-2.0 and configure the the gnuplot again. This time it DOES detect your terminal.

Hope this helps. I myself have had to give it hours.

share|improve this answer

I have succeed in installing gnuplot after installing the following libraries:

sudo apt-get install libx11-dev libxt-dev libreadline-gplv2-dev glib-2.0 

Using the first 3 allowed to use gnuplot. After installing glib-2.0 allowed me plot in a x11 terminal.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.