## Matplotlib

Matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hard copy formats and interactive environments across platforms. Matplotlib can be used in python scripts, the python and ipython shell (ala MatLab or Mathematica), web application servers, and six graphical user interface toolkits.

Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, error charts, scatter plots, etc, with just a few lines of code. (PDF document, screenshots)

Some examples of Matplotlib….

The source code for the above plot is as follows:#!/usr/bin/env python # a polar scatter plot; size increases radially in this example and # color increases with angle (just to verify the symbols are being # scattered correctlu). In a real example, this would be wasting # dimensionlaity of the plot from pylab import * N = 150 r = 2*rand(N) theta = 2*pi*rand(N) area = 200*r**2*rand(N) colors = theta ax = subplot(111, polar=True) c = scatter(theta, r, c=colors, s=area) c.set_alpha(0.75) show()

## Leave a Reply