Installing Cairo terminals in Gnuplot (Ubuntu)

1

I didn't find the "cairo" terminals installed with Gnuplot downloaded from the project site: they aren't listed after set terminal. How do I install it? I can't find any instructions on the internet.

(For example I need to use pngcairo and cairolatex).

I'm working on Ubuntu 15.10 and Gnuplot is 5.0.1.

Edit: in config.log I found

cairo-based terminals: no (requires cairo>1.2, pango>1.10)

So I suppose I must install those packages: my real question is "how"?

Gabriele

Posted 2015-11-24T12:48:49.813

Reputation: 23

Did you mean when you are inside the gnuplot interpreter and you write set term those terminal are not listed? In the configure script it is enabled by default. (Indeed you can select --without-cairo). Check the configure output it should say you cairo-based pdf and png terminals: yes. If not you need to install some library. Add the gnuplot version. – Hastur – 2015-11-24T13:01:40.557

I added the information you suggested: the problem is I don't have the needed packages. – Gabriele – 2015-11-24T14:02:57.243

If you want only gnuplot, not updated at the last version, you can always write sudo apt-get install gnuplot without compiling it. – Hastur – 2015-11-24T14:34:25.837

Answers

1

You need to install the development (-dev) library of some packages.
Let's start with

sudo apt-get install  libcairo2-dev  libpango1-dev

maybe even libgd-dev ...

After run ./configure and look at the output (eventually filter it with ./configure | grep no ) searching for the missing libraries.

Notes

  • With ./configure --help you can see the options that you can enable/ disable.
  • With ./configure the script will try to configure gnuplot to be compiled. For each package it can say you yes or no when it finds the library or not...
  • The library requirements change with the option you are asking for.
  • With sudo apt-get install partial_name + Tab it should show you the alternatives.
  • You can even search for packages with apt-cache search partial_name + Enter
  • You may want to install the cosy aptsh.

Reference

Hastur

Posted 2015-11-24T12:48:49.813

Reputation: 15 043

libpango1.0-dev and libgd-dev were missing (I just didn't know that they were missing). Now it works fine: from the log: cairo-based pdf and png terminals: yes and they appear and work after set terminal. Thanks! – Gabriele – 2015-11-24T14:42:15.820

You're welcome, usually there are other libraries that can miss... The recipe is the same, the ingredients can differ. – Hastur – 2015-11-24T14:45:42.387