7

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.

2
  • 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? Aug 10, 2012 at 14:38
  • 1
    This post solved the problem for me: askubuntu.com/questions/217867/…
    – jotrocken
    Mar 20, 2013 at 15:05

4 Answers 4

9

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!!!

1

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?

1

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .