作者:empty 页数:1267 出版社:empty |
INTRODUCTIONmatplotlib is a library for making 2Dplots of arrays in Python.Although it has its origins in cmu lating theMATLAB O graphics commands, it is independent of MATLAB, and can be used in a Pythonic.objectoriented way.Although matplotlib is written primarily in pure Python, it make she a yy use of NumPy andother extension code to provide good performance even for large arrays.matplotlib is designed with the philosophy that you should be able to create simple plots with just a fewcommands, or just one!If you want to see a histogram of your data, you should n't need to instantiateobjects, call methods, setproperties, and soon, it should just workFor years, I used to use MATLAB exclusively for data analysis and visualization, MATLAB excel sat mak-ing nice looking plots easy.When I began working with EEG data, I found that I needed to write applicationsto interact with my data.and developed and EEG analysis application in MATLAB.As the application grewin complexity, interacting with databases, http servers, manipulating complex datastructures, I hegan tostrain against the limitations of MATLAB as a programming language, and decided to start over in Python.Python more than makes up for all of MATLAB's deficiencies as a programming language, but I was havingdificult yfindinga2D plotting package(for 3DVTK more than exceeds all of my nc eds) .When I went searching for a Python plot ing package, I had several requirements:·Plots should look great-publication quality.One important requirement for me is that the text looks·Postscript output for inclusion with TeX documents·Embeddable in a graphical userinterface for application development·Code should be easy enough that I can understand it and extend itFinding no package that suited me just right, I did what any self respec ing Python programmer would do:rolled up my sleeves and dived in.Not having any real experience with computer graphics, I decided toemulate MATLAB's plotting capabilities because that is something MATLAB does very well.This had theadded advantage that many people have alot of MATLAB experience, and thus they can quickly get up tosteam plotting in python.From a developer's perspective, having a fixed userinterface(the py lab interface)has been very useful, because the guts of the codebase can be redesigned without affecting user code,'MATLAB is a tester ed trademark of TheM at Works, In eThe matplotlib code is conceptually divided into three parts:the py lab interface is the set of functionsprovided by matplotlib.py lab which allow the user to create plots with code quite similar to MATLABfigure generating code(Py plot tutorial) .Them at plor lib frontend or matplotlib API is the set of classes thatdo the heavy lifting, creating and managing figures, text, lines, plots and soon(Arris t tutorial) , This is anabstract interface that knows nothing about output The backends are device dependent drawing devices, akarenderers, that transform the frontend representation to hardcopy or a display device(What is a backend 7) .Example backends:PS creates PostScript o hardcopy.SVG creates Scalable Vector Graphics hardcopy.Agg creates PNG output using the high qual y Anti-Grain Geometry library that ships with matplotlib.GTK embeds matplotlib in a Gtk+application, GTK Agg uses the Anti-Grain renderer to create a figure andembed it a Gtk+application, and soon for PDF, WxWidgets, Tkinter ete.matplotlib is used by many people in many different contexts.Some pc ople want to automatically generatePostScript fles to send to a printer or publishers, Others deploy matplotlib on a web applicationserver togenerate PNG output for inclusion in dynamically-generated webpages.Some use matplotlib interactivelyfrom the Python shell in Tkinter on Windows TM My primary use is to embed matplotlib in a Gtk+EEGapplication that runs on Windows, Linux and Macintosh OSX.good(antialiased, etc.)
I User's Guide
1 Introduction
2 Installing
3Pyplot tutorial
4 Interactive navigation
Manually installing pre-built packages.
Installing from sour ee
Build requirements.
Building on OSX.
Controlling line proper tes.
Working wih mult le figures and axes
Working with text
Navigation Keyboard Shortcuts
Customizing matplotlib
5.1The matplotlib rc tile.
5.2Dynamic re settings
6 Using matplotlib in a python shell
6.IIpython to the rescue.
6.2Other python interpreters.
6.3Controlling interactive updating.
7 Working with text
7.1Text introduction.
7.2Basic text commands.
7.3Text properties and layout.
7.4Wing ma the mai al expressions
7.5Typeset in gW thX e LaTeX/Lua LaTeX.
7.6Text rendering With LaTeX.
7.7Annotating text.
8 Image tutorial
8.1Startup commands.
8.2Impor g imaged alain to Numpy a rays
8.3Plotting numpy arrays as images
Artist tutorial
9.1Customizing your objects
9.2Object containers.
9.3Figure container
9.4Axes container.
9.5Axis containers,
9.6Tick containers.
10 Customizing Location of Subplot Using Grid Spec
10.1 Basic Example of using subplot 2grid.
10.2GridSpec and SubplotS pee.
10.3AdjustGridSpec layout.+.
10.4GridSpec using SubplotS pee.
105AComplexNestedGidSpec using SubplotS pee
10.6GridSpec with Varying Cell Sizes.
11 Tight Layout guide
11.1 Simple Example.
12 Legend guide
12.1 What to be displayed.
12.2 Multicolumn Legend.
12.3 Legend location.
12.4 Multiple Legend
12.5 Legend of Complex Plots
13 Event handling and picking
13.1 Event connections.
13.2Eventattribures.
13.3 Mouseenter and leave
13.4 Object picking.
14 Transformations Tutorial
14.1 Data coordinates.
14.2Axes coordinates.
14.3Blended trans fur mations.
14.4 Using of set transforms to create a shadow ef feet.
14.5 The transformation pipeline.
15Path Tutorial
15.1Bezier example.
15.2 Compound paths
16 Annotating Axes
Annotating with Text with Box.
16.2Annotating with Arrow.
163PlngArstal the anchored lotion of the Axes.
16.4 Using Complex Coordinate with Annotation.
16.5 Using Connector Patch.
16.6ZoomelTect between Axes.
16.7 Define Custom Box Style.
17Our Favorite Recipes
17.1 Sharing axis limits and views
17.2 Easily creating subplots.
17.3Fixing common date annoyances
17.4Fill Between and Alpha!!¥
17.5 Transparent, fancy legends.
17.6 Placing textboxes.
18 Screenshots
18.1 Simple Plot.
18.2Subplotdemo.
18.3 Histograms.
18.4Pathdemo
18.5mplot3d.
18.6 Ellipses,
18.7Bar charts.
18.8Pie charts.
18.9 Table demo
18.10 Scatter demo.
18.11Sliderdemo.
18.12Filldemo.
18.13Datedemo.
18.14 Financial charts.
18.15Basemapdemo.
18.16Logplots.
18.17Polarplots.
18.18 Legends.
18.19Math text_examples,
18.20NativeTeX rendering
18.21EEGdemo.
19 What's new in matplotlib
19.1newinmatplothib-1.2.
19.2 new in matplotlib-1.1.
19.3 new in matplotlib-1.0.
19.4new in matplotlib -0.99
19.5 new in 0.98.4
20Github stats
21 License
21.1 License agreement for matplotlib 1.2.1
22 Credits
The Matplotlib FAQ
23 Installation
23.1Report a compilation problem.
232matplotlibeompiledne, bur nothing shows up when T use it.
23.3How to completely remove matplotlib.
23.4How to Install
23.5 Linux Notes
23.6OS-X Notes.
23.7 Windows Notes.
24 Usage
24.1 General Concepts.
24.2 Matplotlib.py lab, and py plot how are they related?
24.3 Coding Styles.
24.4Whatisa backend?.
24.5 What is interactive mode?
25How-To
25.1 Plotting:howto.
25.2Contibutng:how o.
25.3Matploilibinaweb applicationserver,
25.4 Search examples.
25.5Cite Matplotlib.
26 Troubleshooting
26.1 Obtaining matplotlib version,
26.2 matplotlib install location.
26.3.matplotlib directory location.
26.4 Getting help-
26.5Problemswihtecentgit versions
27 Environment Variables
27.1Setting environment variables in Linux and OS-X,
27.2 Setting environment variables in windows.
IIIThe Matplotlib Developers'Guide
28 Coding guide
28.1Pull request checklist.
28.2 Styleguide.
28.3Hints,
29 Licenses
29.1WhyBSD compatible?.
30 Working with matplotlib sourcecode
30.1 Introduction.
30.2Installgit.
30.3 Following the latest source
30.4 Making a patch.
30.5Git for development
30.6git resources.
31 Testing
31.1 Requirements.
312 Running the test
31.3 Writing a simpletest.
31.4Wriingan image comparison test
31.5 Known failing tests.
316 Creating a new module in mat plot ib tests
31.7Usingtox,
31.8UsingTravsCI.
32 Documenting matplotlib
32.1Gettingstarted
3.Organization of mat plot i's document a in.
32.3 Formatting.
32.4 Figures; .
32.5 Referring to mpl documents
32.6 Internal section references
32.7 Section names, etc.
32.8 Inheritance diagram ns.
32.9Emacs helpers
33Doingamatplolib release
33.1 Testing.
33.2Branching
33.3 Packaging
33.4 Posting files
33.5UpdatePyPT.
33.6 Documentation updates
33.7Announcing.
34 Working with transformations
34.1 matplotlib.transforms
35 Adding news eales and projections to matplotlib
35.1 Creating a new scale.
35.2 Creating a new projection.
35.3API documentation.
IVMatplotlib Axes Grid Toolkit
36 Overview of Axes Grid toolkit
36.1What is Axes Grid toolkit?.
36.2AXESGRIDI.,
36.3AXIS ARTIST.
37TheMatplotlbAxesGrid Toolkit User's Guide
37.1Axes Divider.
37.2AXIS ARTIST namespace
38 The Matplotlib Axes Grid Toolkit API
38.1mpl_toolkits.axes_grid.axes_size.
38.2mpl_toolkits.axes_grid.axes_divider.
38.3mpl_toolkits.axes_grid.axes_grid,
38.4mpl_toolkits.axes_grid.axis_artist
39Matplotlbmplot3d toolkit
39.1mplot3d tutorial.
39.2mploi3dAPI.
39.3mplot3dFAQ-
VIToolkits
40 Basemap
41GTK Tools
42 Excel Tools
43Natgrid
44mplot3d
45AxesGrid
VIIThe Matplotlib API
46 Plotting commands summary
47API Changes
47.1Changes in 1.2.x.
47.2 Changes in 1.1.x
473 Changes beyond 0.99.x.
47.4 Changes in 0.99
47.5 Changes for 0.98.x.
47.6 Changes for 0.98.1
47.7 Changes for 0.98.0.
47.8 Changes for 0.91.2
47.9 Changes for 0.91.1
47.10 Changes for 0.91.0,
47.11 Changes for 0.90.1
47.12 Changes for 0.90.0.
47.13 Changes for 0.87.7
47.14 Changes for 0.86.
47.15 Changes for 0.85.
47.16 Changes for 0.84
47.17 Changes for 0.83
47.18 Changes for 0.82.
47.19 Changes for 0.81
47.20 Changes for 0.80.
47.21 Changes for 0.73
47.22 Changes for 0.72
47.23 Changes for 0.71.
47.24 Changes for 0.70
47.25 Changes for 0.65.1
47.26 Changes for 0.65
47.27 Changes for 0.63
47.28 Changes for 0.61.
47.29 Changes for 0.60
47.30 Changes for 0.54.3
47.31 Changes for 0.54.
47.32 Changes for 0.50,
47.33 Changes for 0.42.
47.34 Changes for 0.40
48 configuration
48.1 matplotlib.
49afm(Adobe FontMetrics interface)
49.1 matplotlib.afm
50 animation
50.1 matplotlib.animation.
51 artists
51.1matplotlib.artist.
51.2 matplotlib.lines.
51.3 matplotlib.patches
51.4 matplotlib.text.
52axes
52.1 matplotlib, axes.
53axis
53.1 matplotlib.axis.
54 backends
54.1 matplotlib.backend_bases.
54.2 matplotlib.backends.backend gtk agg.
54.3 matplotlib.backends.backend_qt4agg
54.4 matplotlib.backends.backend_wx agg.
54.5 matplotlib.backends.backend_pdf.
54.6 matplotlib.dvi read
54.7 matplotlib.type 1font.
55c book
55.1 matplotlib.c boo