Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering matplotlib

You're reading from  Mastering matplotlib

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781783987542
Pages 292 pages
Edition 1st Edition
Languages
Authors (2):
Duncan M. McGreggor Duncan M. McGreggor
Profile icon Duncan M. McGreggor
Duncan M McGreggor Duncan M McGreggor
Profile icon Duncan M McGreggor
View More author details

Table of Contents (16) Chapters

Mastering matplotlib
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Up to Speed 2. The matplotlib Architecture 3. matplotlib APIs and Integrations 4. Event Handling and Interactive Plots 5. High-level Plotting and Data Analysis 6. Customization and Configuration 7. Deploying matplotlib in Cloud Environments 8. matplotlib and Big Data 9. Clustering for matplotlib Index

Coding style


The coding style used throughout this book and in the example code conforms to the standards laid out in PEP 8, with one exception. When entering code into an IPython Notebook or providing modules that will be displayed in the notebook, we will not use two lines to separate what would be module-level blocks of code. We will just use one line. This is done to save screen space.

Something that might strike you as different in our code is the use of an extraordinary feature of Python 3—function annotations. The work for this was done in PEP 3107 and was added in the first release of Python 3. The use of types and static analysis in programming, though new to Python, is a boon to the world of software. It saves time in development of a program by catching bugs before they even arise as well as streamlining unit tests. The benefit of this in our particular case, with regard to the examples in this book, is quick, intuitive code clarification. When you look at the functions, you will instantly know what is being passed and returned.

Finally, there is one best practice that we adhere to that is not widely adopted in the Python programming community—functions and methods are kept small in all of our code. If more than one logical thing is happening in a function, we break it into multiple functions and compose as needed. This keeps the code clean and clear, making examples much easier to read. It also makes it much easier to write unit tests without some of the excessive parameterization or awkward, large functions and methods that are often required in unit tests. We hope that this leaves a positive, long-lasting impression on you so that this practice receives wider adoption.

You have been reading a chapter from
Mastering matplotlib
Published in: Jun 2015 Publisher: ISBN-13: 9781783987542
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}