Sunday, February 04, 2007

gnuplot 4.2

gnuplot is one of those programs I can't live without. It's fair to say that 70% of the graphics I've published in my work were created with gnuplot, and the only reason that figure isn't higher is that I wrote a lot of papers before I found out about gnuplot.

The version supplied with Dapper is 4.0, but I found from an email that 4.2.rc4 was recently released. Going to the project home page I found that this release included support for animated GIFs, something that I was trying to create more or less by hand for an upcoming talk. Now expecting the new version to be available in Dapper is a bit much, so I went to SourceForge and downloaded the tarball. (Click on "Download gnuplot development," then on "4.2.rc4." It's not obvious.)

After a bit of tweaking, I found that I had to fire up synaptic and install the libreadline5-dev and libgd2-dev packages. These let me compile in readline support, so I can do things like tab-complete file names, and support for gif and png files, for the aforesaid animated gifs.

From there it's straightforward, using the checkinstall to create the .deb file:

$ untar gnuplot-4.2.rc4.tar.gz
$ cd gnuplot-4.2.rc4
$ ./configure --with-readline=gnu --enable-history-file
$ make
$ sudo checkinstall -D make install-strip

This makes, and installs,

gnuplot-4.2.rc4_4.2.rc4-1_i386.deb

which works. Once I get the paper cleared and presented, I'll see about putting up one of the animated gifs as an example.

2 comments:

Anonymous said...

great work... I'm using Ubuntu Feisty Fawn and had problems with missing png-export in gnuplot 4.2 after manually installing the tarball from sourceforge (--with-png is no valid ./configure-option anymore) but with your configure-options everything seems to work fine!

rcjhawk said...

Thank you for reminding me. Since I just upgraded to Feisty, I have to recompile gnuplot as well.