matplotlib is a python 2D plotting library which produces publication quality ﬁgures in a variety of hardcopy 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 works with 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. For the power user, you have full control of line styles, font properties, axes properties, etc, via an object oriented interface or via a handle graphics interface familiar to matlab users.