@header@
There are two kinds of matplotlib backends: vector based and raster based. The vector based backends, SVG and PS, produce ASCII text output files *.svg and *.ps. The core raster based renderer is the antigrain (agg) backend. This is a high quality 2D library that supports fast antialiasing, alpha blending and much more. If you want to produce PNGs or GUI images that support all of matplotlib's features, you should compile matplotlib with agg support and use one of the GUI agg backends as described below: GTKAgg, WXAgg, TkAgg or FLTKAgg. All of these features are included in the windows installer
The top of setup.py contains some flags controlling which backends will be built. If you want to use a GUI backend, you will need either Tkinter, pygtk or wxpython installed on your system, from src or from a package manager including the devel packages. You can choose which backends to enable by setting the flags in setup.py, but the 'auto' flags will work in most cases, as matplotlib tries to find a GUI and build the backend acccordingly. If you know you don't want a particular backend or extension, you can set that flag to False.
As discussed above, most users will want to set BUILD_AGG = 1 and one or more of the GUI backends to True. Exceptions to this are if you know you don't need a GUI (eg a web server) or you only want to produce vector graphics.
If you have installed prerequisites to nonstandard places and need to inform matplotlib where they are, edit setupext.py an add the base dirs to the basedir dictionary entry for your sys.platform. Eg, if the header to some required library is in /some/path/include/somheader.h, put /some/path in the basedir list for your platform.
Note, matplotlib works with with Numeric or numarray, but it is important that you set NUMERIX in setup.py to the array package you typically use, for efficiency reasons. For performace, it is critical that the numerix settings in setup.py and in your .matplotlibrc file are the same, and are the same as the array package you typicaly use.
Note that if you install matplotlib anywhere other than the default location, you will need to set the MATPLOTLIBDATA environment variable to point to the install base dir.
For standard python installations, you will also need to install either Numeric or numarray in addition to the matplotlib installer. matplotlib provides installers for Numeric and numarray users. It is important that you pick the matplotlib installer that corresponds to your array package. Ie, if you mostly work with numarray arrays, use the matplotlib numarray installer. matplotlib has a numerix setting in the matplotlib rc file (which by default resides in c:\python23\share\matplotlitb\.matplotlibrc) and you should make sure this setting corresponds to your preferred array package.
With a standard python + Numeric/numarray + matplotlib, the following backends should work on windows: agg, tkagg, ps, svg. If you want others, eg a wx, wxagg, gtk or gtkagg, you'll need to install the requisite GUI toolkits, as described on backends. This is fairly easy, as both wxpython and pygtk come with windows friendly installers. The latter includes an additional requirement of the GTK runtime.
All of the GUI backends run on windows, but TkAgg is probably the best for interactive use from the standard python shell or ipython. The windows installer (*.exe) on the download page contains all the code you need to get up and running. However, there are many examples that are not included in the windows installer. If you want to try the many demos that come in the matplotlib src distribution, download the zip file and look in the examples subdir.
Important: There are known conflicts with some of the backends with some python IDEs such as pycrust, idle. If you want to use matplotlib from an IDE, please consult backends for compatibility information. You will have the greatest likelihood of success if you run the examples from the command shell or by double clicking on them, rather than from an IDE. If you are interactively generating plots, your best bet is TkAgg from the standard python shell or ipython.
deb http://anakonda.altervista.org/debian packages/ deb-src http://anakonda.altervista.org/debian sources/
# apt-get update # apt-get install python-matplotlib python-matplotlib-doc