作者:empty 页数:307 出版社:empty |
About the ReviewersMichael Droe tt boom holds a Master's Degree in Computer Music Researchfrom The Johns Hopkins University.His research in optical music recognition leadto the development of the Gamera document image analysis framework, which hasbeen used to recognize features in documents as diverse as medieval manuscript,Navajo texts, historical Scottish census data, and early American sheetmusic.Hisfocus on computer graphics has lead to specializations in consumer electronics,computer-assisted engineering, and most recently, the science software for the SpaceTelescope Science Institute.He is currently one of the most active developers on theMatplotlib project.Reinier He eres has an MSe degree in Applied Physics from the Delft University ofTechnology, The Netherlands, He is currently pursuing a PhD there in the QuantumTransport group of the nanoscience department.He has previously worked on Sugar, the child-friendly userinterface mainly in useby One Laptop Per Child 'sS 100 laptop.For this project, he designed the Calculatorapplication.Recently, he revived and extended the 3D plotting functionalities for Matplotlib tomake it an excellent 2D graphing library, and a simple 3Dplottngtool againI wish to thank myson, Kai, for asking all the hard questions
Chapter1:IntroductiontoMatplotlib
Merits of Matplotlib
Matplotlib websites and online documentation
Output formats and backends
Output formats
Backends
About dependencies
Build dependencies
Installing Matplotlib
Installing Matplotlib on Linux
Install n gMat plot i bon Windows
Installing Matplotlib on MacOSX
Installing Matplotlib using packaged Python distributions
Installing Matplotlib from sourcecode
Testng our installation
Summary
Chapter2:GettingStartedwithMatplotlib
First plots with Matplotlib
Multiline plots
A brief introduction to NumPy arrays
Grid, axes, and labels
Adding a grid
Handling axes
Adding labels
Titles and legends
Adding a title
Adding a legend
TableofContents
A complete example
Saving plots to a file
Interactive navigation toolbar
IPython support
Controlling the interactive mode
Suppressing functions output
Configuring Matplotlib
Configuration files
Configuring through the Python code
Selecting backend from code
Summary
Chapter3:DecorateGraphswithPlotStylesandTypes
Markers and line styles
Control colors
Finer control with keyword arguments
Text inside figure, annotations, and arrows
Download a tWo weB oak.Com
Download a tWo we Book.Com
Specifying styles in mullin e plots
Control line styles
Control marker styles
Handling X andY ticks
Plot types
Histogram charts
Errorbar charts
Bar charts
Pie charts
Scatterplots
Polar charts
Navigation Toolbar with polar plots
Control radial and angular grids
Text inside figure
Annotations
Arrows
Summary
Chapter4:AdvancedMatplotlib
Object-oriented versus MATLAB styles
A brief introduction to Mat plot ib objects
Our first(simple) example of OO Matplotlib
Subplots
Multiple figures
Additional Y(or X) axes
Axes formating with axe stick locators and for matters
Custom for matters and locators
Text properties, fonts, and LaTeX
Fonts
Using LaTeX format tng
Math text
Exte malTe X renderer
Contour plots and image plotting
Contour plots
Image plotting
Summary
Chapter5:EmbeddingMatplotlibinGTK+
A brief introduction to GTK+
Introduction to GTK+signal system
Embedding a Matplotlib figure in a GTK+window
Including a navigation toolbar
Real-time plots update
Embedding Matplotlib in a Glade application
Designing the GUl using Glade
Summary
Chapter6:EmbeddingMatplotlibinQt4
Brief introduction to Qt4andPyQt 4
Embedding a Matplotlib figure in a Qt window
Including a navigation toolbar
Realtime update of a Matplotlib graph
Embedding Matplotlib in a GUI made with Qt Designer
Designing the GUl using Qt Designer
Code to use the Qt Designer GUI
Introduction to signals and slots
Returning to the example
Summary
Chapter7:EmbeddingMatplotlibinwxWidgets
Brief introduction to wxWidgets and wxPython
Embedding a Matplotlib figure in a wx Frame
Including a navigation toolbar
TableofContents
Real-time plots update
Embedding Matplotlib in a GUI made with wx Glade
Summary
Chapter8:MatplotlibfortheWeb
Matplotlib and CGI
What is CGI
Configuring Apache for CGl execution
Simple CGl example
Ma