ppgplot is a python module (extension) providing bindings to the PGPLOT graphics library. PGPLOT is a scientific visualization (graphics) library written in Fortran by T. J. Pearson. C bindings for PGPLOT are also available. ppgplot makes the library usable by Python programs. It uses the Numeric Python module, to efficiently represent and manipulate vectors and matrices.
I originally wrote ppgplot back in 1998, because I needed a good visualization library, and a powerful, high-level language to process and display some data I was working on. Since then a lot have happened, and as it came to be, I stopped working on it, and eventually even lost the source-code due to a disk crash. In 2003, I found-out that ppgplot is still alive thanks to the care of M. A. Breddels, to whom I owe much gratitude. Following the "rediscovery" of ppgplot I decided to polish it up a little, and give it a new (permanent I hope) home here. I plan to maintain it so that it works with newer PGPLOT, Python, and Numeric Python versions, and possibly even add some features.
You feedback is most welcome. Please send your comments, suggestions, questions, and remarks to:
Nick Patavalis <npat [at] efault [dot] net>
If you tried to use ppgplot with numarray, please drop a couple of lines to the author (address above) to report whether you succeeded or failed, and what was your platform (cpu type, operating system, python version, numarray version, ppgplot version). Thanks.
One thing I found missing from Python and Numeric Python was a good library-of-functions (module) specially designed for scientific visualization (as opposed to imaging or GUI implementation). I know there is at least one interface to Gnuplot, and other interfaces for plotting through programs like Mathematica. They are a good solution for simple tasks, and maybe even more. One has to admit, though, that they lack the power (performance) and versatility required for several more complex applications. This is true for a number of reasons:
1. They provide their services through a different task, usually communicating via temporary files. This is not the most efficient architecture, and its also not free of other problems.
2. Some of them are implemented as python scripts. Python is nice, powerful and easy to use, but it lacks the performance of C.
3. The underlying programs that actually provide the graphics capabilities are usually not general-purpose visualization tools but programs primarily designed for interactive use (e.g. Gnuplot)
In order to circumvent these limitations I decided to implement an interface module that enables Numeric Python to call the functions of the (really remarkable) PGPLOT graphics library. The interface module is written in C and provides almost the full set of PGPLOT facilities, wrapped in a python interface that resembles as much as possible the original PGPLOT semantics and calling conventions. I decided to do so in order to make life easier for those who are already familiar with PGPLOT. I have also coded an alternative interface for some PGPLOT functions that had a rather "complicated" interface. These simplified interfaces are more close to python's idiosyncrasies, and were designed to take advantage of some of its special features (like optional arguments or keyword arguments, etc).
For those of you who are not familiar with PGPLOT here's a short description:
PGPLOT is written by Tim Pearson
The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, device-independent graphics package for making simple scientific graphs. It is intended for making graphical images of publication quality with minimum effort on the part of the user. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time.
The PGPLOT library consists of two major parts: a device-independent part and a set of device-dependent ``device handler'' subroutines for output on various terminals, image displays, dot-matrix printers, laser printers, and pen plotters. Common file formats supported include Postscript and GIF.
The ppgplot Python extension module (but not the PGPLOT Fortran library) is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA