Plotting Library

I wanted to find a plotting library for plotting charts (histograms, bar charts, pie charts). I like to either call from Python, or simply create a large data file and generate the plot using a command line tool. An interface for other programming languages, such as Java is a bonus, but no requirement. I wanted to be able to use the output in LaTeX articles, and on websites. So it should be able to output to PDF, SVG (vector) and PNG (bitmap). I currently have no desire to create interactive programs myself, though it is nice if I am able to interactively play with the output settings.

A good starting point is: Plotting and data visualization Tools with a (mostly) 2-D focus from the Topical Overview at SciPy. The lists contains many Python libraries that are useful for scientific computing with Python.

All of the packages bellow are good choices. Which one you choose really depends on your needs (interactive or batch processing, plotting or statistical analysis, etc.)

In the overview below, I've only looked at output formats PNG, PDF, SVG and terminal window (regardless if that was Aqua, Wx, GTK or X11). I've only looked at chart types Function Plot, Logarithmic Plot, Date/Time Plot, Bar Chart, Histogram, Scatter Plot, Pie Chart, Polar Plot, Map Projection, Contour Plot, Vector Plot, and 3D Plot.

Gnuplot
Python interface to Gnuplot

GNUplot is a very versatile plotting programming from UNIX. The Python interface is a very simple shell, and basically writes temporary files which are piped to gnuplot. Given this very basic shell, it may be just as simple to simply do writing to file and calling gnuplot yourself, instead of relying on this library. That is indeed be a simple but powerful solution.

MatPlotLib
MatPlotLib is a python 2D plotting library.

Very slick looking plotting library for Python. Well written and easy learning curve. Simulates a Mathlab or Mathematica interface. The API is very interactive, and some API calls work with a global graphs instead of manipulating objects.

In order to get a full working scientific environment, about as powerfull as mathlab, you should install NumPy (fast multi-dimensional arrays, mathematics), SciPy (engineering modules), MatPlotLib (Plotting), and iPython (Interactive shell). The combination of these four is called PyLab.

PLplot
PLplot

Cross-platform plotting library. Fine-grain control over the output. Slightly steaper learning curve than MatPlotLib, but still easier and more modern than GnuPlot. It seems great if

R
Python interface to R

R is an environment for Statistical Computing. It is not just a parser, but instead a whole programming environment. It is made for interactive statistical analysis as opposed to simply generating plots, and that shows in the output (which is rather text-based). Reminds me of statistical programs like ANOVA and SPSS.

PPGPLOT
PPGPLOT is a Python interface to PGPLOT.

PGPLOT is an older library, written in Fortran. PPGPLOT is a Python interface to PGPLOT, and was originally written in 1998. While it is reasonably fast, there are not so many output formats, and it relies on the older Python Numeric library instead of the newer numpy.

PyChart
PyChart is a good module to plot line, bar, and pie charts and scatter plots in Python. You have good control of text. Nothing more, nothing less.

Chaco
Chaco is project similar to MatPlotLib: it is also highly interactive. The difference is that Chaco is faster, is mostly geared towards developers writing an application (e.g. it is easy to build a stand-along audio spectrum analyzer with Chaco). The downside is that the documentation is still a bit scattered (the examples are the best place to look), and it very geared towards displaying the graph on screen as oppossed to writing to file.