Install gnuplot on Ubuntu


There is an updated Howto for Ubuntu Gutsy Gibbon available.

Though there is gnuplot available in the Ubuntu/Debian repositories, there are reasons to compile gnuplot – first and most important gnu readline support! I don’t know why Debian maintainers don’t compile the GNU readline support into GNUplot – it’s some license issues – but it’s like that and this makes gnuplot practically unusable. Second having the pdf and wxWidgets terminal is not that bad at all :)

So here are the instructions:

First we compile and install wxWidgets

  • Download wxWidgets GTK 2.8.3
  • Untar it somewhere: tar xzf wxGTK-2.8.3.tar.gz
  • cd cd wxGTK-2.8.3/
  • mkdir buildgtk
  • cd buildgtk
  • ../configure
  • make
  • sudo paco -lp wxGTK-2.8.3 make install (or just make install if you don’t use paco)
  • sudo ldconfig (you may need to add /usr/local/lib to the file /etc/ld.so.conf before)

Than we are going to install the PDFlib lite

  • Download PDFlib Lite
  • tar xzf PDFlib-Lite-7.0.1.tar.gz
  • cd PDFlib-Lite-7.0.1
  • ./configure
  • make
  • sudo paco -lD make install
  • sudo ldconfig

Than we compile gnuplot

  • Download gnuplot 4.2
  • tar xzf gnuplot-4.2.0.tar.gz
  • cd gnuplot-4.2.0
  • ./configure –with-readline=gnu (check if we have the lines “pdf terminal: yes” and “wxt terminal: yes (EXPERIMENTAL)”, if you miss the jpeg, png and gif terminal install the libgd2-xpm-dev package; also check if you find “Readline library: GNU readline library with -lncurses”, if it says only minimal readline support than install the libreadline5-dev package; you need also the libx11-dev and libxt-dev package for the X11 terminal – libxt-dev package is normally not installed by default (at the debian page about gnuplot one can find the packages necessary to build gnuplot))
  • make (if you have problems here with some latex errors than disable the latex tutorial during the configure stage with “–without-tutorial”, if you get a “103: makeinfo: not found” error message than install the texinfo package)
  • sudo paco -lD make install

Than you have gnuplot installed with nice readline support (command line like in bash), a nice new wxWidgets terminal and a pdf terminal.

Advertisements
%d bloggers like this: