Showing posts with label gnuplot 4.2. Show all posts
Showing posts with label gnuplot 4.2. Show all posts

13 March 2007

gnuplot 4.2 on ubuntu: update

Edo pushes me to take a look at the several options one can select while compiling. The complete list is not so deep (you can find it through ./configure --help, or inside the INSTALL file). Moreover, as a matter of fact, most of them are selected by default (like the useful --enable-history-file and --enable-datastrings, which enables gnuplot to apply a label just near the coordinates of each point of the plot).
Anyway, the one I consider the most useful for the everyday life with gnuplot − namely enabling the GNU readline − is not selected by default. This option enables the gnuplot prompt to act just like a common shell one, provided with its powerful line-editing capabilities (which are taken, as Wikipedia says, from one of GNU's earliest and most popular projects, Emacs!). As usual, life is quite easy with Ubuntu. My previous recipe is still good with two small things.
First of all, make sure to have the libreadline5-dev package installed. If not, it is easy to use apt-get, Synaptic or Adept Manager to find and install it.
Finally, simply add the --with-readline=gnu option to the first ./configure command.
That's all Folks!

09 March 2007

gnuplot 4.2 on ubuntu: right now!

Just a few days ago the new version of gnuplot was released. As you can read from the announce, it has been almost 3 years since release of the previous version 4.0. This new version contains a ton of new features, support for several new output devices, and improved performance. But I don't know how much I'm supposed to wait before the ubuntu guys will include this brand new version into its official repositories. Moreover, if you google for a debian package, you will find no more than the 4.0.0-5 version. So I moved to install gnuplot from sources.
   —   ∴   —   
So I took my tar-ball and unzipped it into a temporary directory:
[hronir@boltzmann:~/gnuplot-src] tar -xzvf gnuplot-4.2.0.tar.gz
[hronir@boltzmann:~/gnuplot-src] cd gnuplot-4.2.0
[hronir@boltzmann:~/gnuplot-src/gnuplot-4.2.0]
To be careful, I decided not to replace the previous instance of gnuplot, so I asked ./configure to take a home-based directory as the --prefix option:
[hronir@boltzmann:~/gnuplot-src/gnuplot-4.2.0] ./configure --prefix=$HOME/gnuplot4.2
[hronir@boltzmann:~/gnuplot-src/gnuplot-4.2.0] make
[hronir@boltzmann:~/gnuplot-src/gnuplot-4.2.0] make install
My first attempt failed just in the last step: it was saying something ending with:
/home/hronir/gnuplot-src/gnuplot-4.2.0/missing: 103: makeinfo: not found
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[1]: *** [gnuplot.info] Error 1
make[1]: Leaving directory `/home/hronir/gnuplot-src/gnuplot-4.2.0/docs'
make: *** [install-recursive] Error 1
But it really was a very small hurdle to overcome. As the warning was suggesting, I simply took the Texinfo package from my Adept Manager and at the second attempt with ./configure, make, make install I get my new-gnuplot [›››] (the only comment is that it was not only a warning, since without the Texinfo package it would not complete the installation...)
Last thing: making the new-gnuplot the default gnuplot. First check which gnuplot is your gnuplot:
[hronir@boltzmann:~] which gnuplot
and bind it to some alias of your choice, for example:
[hronir@boltzmann:~] alias gnuplot-old=`which gnuplot` 
Then bind a gnuplot alias to the new-gnuplot, which lies in the bin directory:
[hronir@boltzmann:~] alias gnuplot='$HOME/gnuplot4.2/bin/gnuplot'
and all done!
 
PS
As a matter of fact, the gnuplot-old alias is not needed. When you have an alias which overloads a pre-existing command, you can always recover the original command by pre-posing a backslash to the command itself. In this case, for example, you have:
[hronir@boltzmann:~] gnuplot --version
gnuplot 4.2 patchlevel 0
[hronir@boltzmann:~] \gnuplot --version
gnuplot 4.0 patchlevel 0
and the gnuplot-old alias is pretty useless.