Mastering matplotlib

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Duncan M. McGreggor
Publisher: Packt Publishing
Year: 2015

Language: English

Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Getting Up to Speed
A brief historical overview of matplotlib
What's new in matplotlib 1.4
The intermediate matplotlib user
Prerequisites for this book
Python 3
Coding style
Installing matplotlib
Using IPython Notebooks with matplotlib
Advanced plots – a preview
Setting up the interactive backend
Joint plots with Seaborn
Scatter plot matrix graphs with Pandas
Summary
Chapter 2: The matplotlib Architecture
The original design goals
The current matplotlib architecture
The backend layer
FigureCanvasBase
RendererBase
Event
Visualizing the backend layer
The artist layer
Primitives
Containers
Collections
A view of the artist layer
The scripting layer
The supporting components of the matplotlib stack
matplotlib modules
Exploring the filesystem
Exploring imports visually
ModuleFinder
ModGrapher
The execution flow
An overview of the script
An interactive session
The matplotlib architecture as it relates to this book
Summary
Chapter 3: matplotlib APIs and Integrations
The procedural pylab API
The pyplot scripting API
The matplotlib object-oriented API
Equations
Helper classes
The Plotter class
Running the jobs
matplotlib in other frameworks
An important note on IPython
Summary
Chapter 4: Event Handling and Interactive Plots
Event loops in matplotlib
Event-based systems
The event loop
GUI toolkit main loops
IPython Notebook event loops
matplotlib event loops
Event handling
Mouse events
Keyboard events
Axes and figure events
Object picking
Compound event handling
The navigation toolbar
Specialized events
Interactive panning and zooming
Summary
Chapter 5: High-level Plotting and Data Analysis
High-level plotting
Historical background
matplotlib
NetworkX
Pandas
The grammar of graphics
Bokeh
The ŷhat ggplot
New styles in matplotlib
Seaborn
Data analysis
Pandas, SciPy, and Seaborn
Examining and shaping a dataset
Analysis of temperature
Analysis of precipitation
Summary
Chapter 6: Customization and Configuration
Customization
Creating a custom style
Subplots
Revisiting Pandas
Individual plots
Bringing everything together
Further explorations in customization
Configuration
The run control for matplotlib
File and directory locations
Using the matplotlibrc file
Updating the settings dynamically
Options in IPython
Summary
Chapter 7: Deploying matplotlib in Cloud Environments
Making a use case for matplotlib in the Cloud
The data source
Defining a workflow
Choosing technologies
Configuration management
The types of deployment
An example – AWS and Docker
Getting set up locally
Requirements
Dockerfiles and the Docker images
Extending a Docker image
Building a new image
Preparing for deployment
Getting setup on AWS
Pushing the source data to S3
Creating a host server on EC2
Using Docker on EC2
Reading and writing with S3
Running the task
Environment variables and Docker
Changes to the Python module
Execution
Summary
Chapter 8: matplotlib and Big Data
Big data
Working with large data sources
An example problem
Big data on the filesystem
NumPy's memmap function
HDF5 and PyTables
Distributed data
MapReduce
Open source options
An example – working with data on EMR
Visualizing large data
Finding the limits of matplotlib
Agg rendering with matplotlibrc
Decimation
Additional techniques
Other visualization tools
Summary
Chapter 9: Clustering for matplotlib
Clustering and parallel programming
The custom ZeroMQ cluster
Estimating the value of π
Creating the ZeroMQ components
Working with the results
Clustering with IPython
Getting started
The direct view
The load-balanced view
The parallel magic functions
An example – estimating the value of π
More clustering
Summary
Index