Matplotlib - Free
Matplotlib
Release 1.1.0 Darren Dale, Michael Droettboom, Eric Firing, John Hunter
October 11, 2011
CONTENTS
I User's Guide
1
1 Introduction
3
2 Installing
5
2.1 Manually installing pre-built packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Installing from source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Build requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Building on OSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Pyplot tutorial
9
3.1 Controlling line properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Working with multiple figures and axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Working with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Interactive navigation
19
4.1 Navigation Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Customizing matplotlib
23
5.1 The matplotlibrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 Dynamic rc settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Using matplotlib in a python shell
33
6.1 Ipython to the rescue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2 Other python interpreters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.3 Controlling interactive updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7 Working with text
37
7.1 Text introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.2 Basic text commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.3 Text properties and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.4 Writing mathematical expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.5 Text rendering With LaTeX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.6 Annotating text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8 Image tutorial
61
i
8.1 Startup commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 8.2 Importing image data into Numpy arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 8.3 Plotting numpy arrays as images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
9 Artist tutorial
75
9.1 Customizing your objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
9.2 Object containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.3 Figure container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
9.4 Axes container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9.5 Axis containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.6 Tick containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
10 Customizing Location of Subplot Using GridSpec
89
10.1 Basic Example of using subplot2grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.2 GridSpec and SubplotSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
10.3 Adjust GridSpec layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
10.4 GridSpec using SubplotSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.5 A Complex Nested GridSpec using SubplotSpec . . . . . . . . . . . . . . . . . . . . . . . 93
10.6 GridSpec with Varying Cell Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
11 Tight Layout guide
95
11.1 Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
12 Legend guide
111
12.1 What to be displayed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
12.2 Multicolumn Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
12.3 Legend location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
12.4 Multiple Legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
12.5 Legend of Complex Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
13 Event handling and picking
119
13.1 Event connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
13.2 Event attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
13.3 Mouse enter and leave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
13.4 Object picking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
14 Transformations Tutorial
129
14.1 Data coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
14.2 Axes coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
14.3 Blended transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
14.4 Using offset transforms to create a shadow effect . . . . . . . . . . . . . . . . . . . . . . . 136
14.5 The transformation pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
15 Path Tutorial
141
15.1 B?zier example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
15.2 Compound paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
16 Annotating Axes
147
16.1 Annotating with Text with Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
ii
16.2 Annotating with Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 16.3 Placing Artist at the anchored location of the Axes . . . . . . . . . . . . . . . . . . . . . . 154 16.4 Using Complex Coordinate with Annotation . . . . . . . . . . . . . . . . . . . . . . . . . 156 16.5 Using ConnectorPatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 16.6 Zoom effect between Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 16.7 Define Custom BoxStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
17 Our Favorite Recipes
165
17.1 Sharing axis limits and views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
17.2 Easily creating subplots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
17.3 Fixing common date annoyances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
17.4 Fill Between and Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
17.5 Transparent, fancy legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
17.6 Placing text boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
18 Screenshots
175
18.1 Simple Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
18.2 Subplot demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
18.3 Histograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
18.4 Path demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
18.5 mplot3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
18.6 Ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
18.7 Bar charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
18.8 Pie charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
18.9 Table demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
18.10 Scatter demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
18.11 Slider demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
18.12 Fill demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
18.13 Date demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
18.14 Financial charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
18.15 Basemap demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
18.16 Log plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
18.17 Polar plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
18.18 Legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
18.19 Mathtext_examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
18.20 Native TeX rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
18.21 EEG demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
19 What's new in matplotlib
197
19.1 new in matplotlib-1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
19.2 new in matplotlib-1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
19.3 new in matplotlib-0.99 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
19.4 new in 0.98.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
20 License
221
20.1 License agreement for matplotlib 1.1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
21 Credits
223
iii
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- matplotlib change line color based on value
- python for data science cheat sheet plot anatomy workflow
- batlow ascientificcolourmap userguide
- aplpy documentation
- introductory notes matplotlib
- documentation
- fc simesh matplotlib package user s guide
- matplotlib tips tricks
- 01 matplotlib ceda document repository
- matplotlib free
Related searches
- matplotlib probability distribution
- matplotlib density plot
- pip install matplotlib windows
- how to install matplotlib python
- matplotlib hist color
- matplotlib hist bin
- matplotlib hist legend
- matplotlib hist bin width
- matplotlib histogram bins
- matplotlib draw lines
- matplotlib legend font colors
- matplotlib boxplot pandas