1
+
1
2
INTRODUCTION
2
3
3
- matplotlib requires at a minimum python 2.2+, Numeric or numarray
4
- and freetype. To get the most out of matplotlib, you will want to
5
- build some of the optional GUI and image extensions, discussed
6
- below. Matplotlib is known to work on linux, unix, win32 and OS X
4
+ matplotlib requires at a minimum python 2.3, numpy, libpng and
5
+ freetype. To get the most out of matplotlib, you will want to build
6
+ some of the optional GUI and image extensions, discussed below.
7
+ Matplotlib is known to work on linux, unix, win32 and OS X
7
8
platforms.
8
9
9
10
There are two kinds of matplotlib backends: vector based and raster
10
- based. The vector based backends, SVG and PS, produce ASCII text
11
- output files *.svg and *.ps. The core raster based renderer is the
12
- http://antigrain.com (agg) backend. This is a high quality 2D
13
- library that supports fast antialiasing, alpha blending and much
14
- more. If you want to produce PNGs or GUI images that support all of
15
- matplotlib's features, you should compile matplotlib with agg
16
- support and use one of the GUI agg backends: GTKAgg, WXAgg, TkAgg or
17
- FLTKAgg.
11
+ based. The vector based backends, SVG, PDF and PS, produce ASCII
12
+ text output files *.svg, *.pdf and *.ps. The core raster based
13
+ renderer is the http://antigrain.com (agg) backend. This is a high
14
+ quality 2D library that supports fast antialiasing, alpha blending
15
+ and much more. If you want to produce PNGs or GUI images that
16
+ support all of matplotlib's features, you should compile matplotlib
17
+ with agg support and use one of the GUI agg backends: GTKAgg, WXAgg,
18
+ TkAgg or FLTKAgg.
18
19
19
20
COMPILING
20
21
21
- You will need to have recent versions of freetype (>= 2.1.7), libpng
22
- and zlib installed on your system. If you are using a package
23
- manager, also make sure the devel versions of these packages are
24
- also installed (eg freetype-devel).
25
-
26
- The top of setup.py contains some flags controlling which backends
27
- will be built. If you want to use a GUI backend, you will need
28
- either Tkinter, pygtk or wxpython installed on your system, from src
29
- or from a package manager including the devel packages. You can
30
- choose which backends to enable by setting the flags in setup.py,
31
- but the 'auto' flags will work in most cases, as matplotlib tries to
32
- find a GUI and build the backend acccordingly. If you know you
33
- don't want a particular backend or extension, you can set that flag
34
- to False.
35
-
36
- As discussed above, most users will want to set 'BUILD_AGG = 1' and
37
- one or more of the GUI backends to True. Exceptions to this are if
38
- you know you don't need a GUI (eg a web server) or you only want to
39
- produce vector graphics.
22
+ You will need to have recent versions of freetype, libpng and zlib
23
+ installed on your system. If you are using a package manager, also
24
+ make sure the devel versions of these packages are also installed
25
+ (eg freetype-devel).
26
+
27
+ matplotlib ships with a setup.cfg.template which you can use to
28
+ customize the build process. Copy it to setup.cfg if you need to
29
+ customize something. See that files for details of the parameters
30
+ you can set.
31
+
32
+ If you want to use a GUI backend, you will need either Tkinter,
33
+ pygtk or wxpython installed on your system, from src or from a
34
+ package manager including the devel packages. You can choose which
35
+ backends to enable by setting the flags in setup.py, but the default
36
+ is to automatically detect your installed GUIs and build support for
37
+ them. If you later find that you did not have a GUI toolkit like
38
+ pygtk installed when you built matplotlib, but now want it, you will
39
+ need to install the toolkit and rebuild matplotlib.
40
40
41
41
If you have installed prerequisites to nonstandard places and need
42
42
to inform matplotlib where they are, edit setupext.py an add the
@@ -45,13 +45,6 @@ COMPILING
45
45
/some/path/include/somheader.h, put /some/path in the basedir list
46
46
for your platform.
47
47
48
- matplotlib works with with Numeric or numarray. At compile time,
49
- setup.py will look for both packages and compile the appropriate
50
- extensions into matplotlib. At runtime, the correct extension code
51
- will be chosen based on your numerix setting in matplotlibrc. If
52
- you want to be able to use either Numeric or numarray efficiently
53
- with matplotlib, it is important that you have *both* present and in
54
- your PYTHONPATH when you compile matplotlib.
55
48
56
49
Once you have everything above set to your liking, just do the usual
57
50
thing
@@ -62,20 +55,19 @@ COMPILING
62
55
WINDOWS
63
56
64
57
If you don't already have python installed, you may want to consider
65
- using the enthought edition of python, which has (old) scipy, Numeric , and
58
+ using the enthought edition of python, which has scipy, numpy , and
66
59
wxpython, plus a lot of other goodies, preinstalled -
67
60
http://www.enthought.com/python . With the enthought edition of
68
61
python + matplotlib installer, the following backends should work
69
- out of the box: agg, wx, wxagg, tkagg, ps and svg.
62
+ out of the box: agg, wx, wxagg, tkagg, ps, pdf and svg.
70
63
71
64
For standard python installations, you will also need to install
72
- either numpy, Numeric or numarray in addition to the matplotlib installer.
73
- With a standard python + Numeric/numarray + matplotlib, the
74
- following backends should work on windows: agg, tkagg, ps, svg. If
75
- you want others, eg a wx, wxagg, gtk or gtkagg, you'll need to
76
- install the requisite GUI toolkits. This is fairly easy, as both
77
- wxpython and pygtk come with windows friendly installers. The
78
- latter includes an additional requirement of the GTK runtime.
65
+ either numpy, in addition to the matplotlib installer. On some
66
+ systems you will also need to download msvcp71.dll library, which
67
+ you can download from
68
+ http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 or other
69
+ sites. You will need to unzip the archive and drag the dll into
70
+ c:\windows\system32
79
71
80
72
All of the GUI backends run on windows, but TkAgg is probably the
81
73
best for interactive use from the standard python shell or ipython.
@@ -113,17 +105,8 @@ DISTROS: (rpms, apt, fink, osx, freebsd, gentoo, etc)
113
105
114
106
DEBIAN
115
107
116
- Vittorio Palmisano <redclay@email.it> maintails the debian
117
- packages at http://mentors.debian.net
118
-
119
-
120
- * add this lines to your /etc/apt/sources.list:
121
- deb http://anakonda.altervista.org/debian packages/
122
- deb-src http://anakonda.altervista.org/debian sources/
123
-
124
- * then run:
125
- # apt-get update
126
- # apt-get install python-matplotlib python-matplotlib-doc
108
+ matplotlib is part of debian (and ubuntu) so you shoule be able to
109
+ apt-get install it.
127
110
128
111
FREEBSD
129
112
0 commit comments