Sunday, January 16, 2011

pyGtkPlot: yet another graphical front-end for gnuplot

The main window of pyGtkPlot.
As the title of this post suggests, I'm going to introduce to you a new graphical interface for gnuplot. The name of the project, pyGtkPlot, surely synthesizes the programming language employed and the target window manager: python and gnome/gtk+ respectively. This project has a (not so) old C ancestor, the gtkplot project at sourceforge.net (a C++ translation was on its way, but was never released to the public, and probably it'll never be). Since the development of the C and C++ version was becoming very slow due to the fact that the team of developers was composed of only one member (:P), that very same one member decided to turn his head towards python. This important decision took some time to become reality, because basically that implied the choice between performances and development speed, but now the pyGtkPlot has officially came to life, and it is hosted at Launchpad.net. There are no stable releases at the moment, but you may consider each new revision as a release candidate. This is because pyGtkPlot embeds the gnuplot x11 terminal inside its graphical interface (for this to work you must have the latest version of gnuplot installed on your linux machine), still retaining all the original interactiveness of gnuplot. Moreover you have the opportunity of sending commands to gnuplot directly, as though you were running it from a console. The only difference is that you have some additional aids at your disposal coming from the surrounding gtk+ widgets of the interface, which will increase in number at each new code revision pushed on Launchpad.

Basically, you start with a new gnuplot session with default settings and add new plots by configuring the panel at the left and then clicking o the + (Add) button in the toolbar, or the Edit -> Add menu entry (keyb. shortcut: Alt + a). You can save the current session for later uses or load a previously saved session in order to modify it or export the plots in different formats, actually in all the terminal supported by your installation of gnuplot (of course you may not want to choose a terminal that does not write to a file, like wxt or x11 :P). You can embed mathatematical formulae too using LaTeX syntax and export in png format directly (check the menu File for this). But, as ever, the best way to learn how to use pyGtkPlot is by playing around with its commands.

No comments:

Post a Comment