Mastering matplotlib
eBook - ePub

Mastering matplotlib

Duncan M. McGreggor

Partager le livre
  1. 292 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering matplotlib

Duncan M. McGreggor

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering matplotlib est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering matplotlib par Duncan M. McGreggor en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Data Modelling & Design. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781783987542

Mastering matplotlib


Table of Contents

Mastering matplotlib
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
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
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
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
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
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
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
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
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 the 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
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
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

Mastering matplotlib

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2015
Production reference: 1250615
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-754-2
www.packtpub.com

Credits

Author
Duncan M. McGreggor
Reviewers
Francesco Benincasa
Wen-Wei Liao
Nicolas P. Rougier
Dr. Allen Chi-Shing Yu
Acquisition ...

Table des matiĂšres