Book Image

Mastering matplotlib

By : Duncan M. McGreggor, Duncan M McGreggor
Book Image

Mastering matplotlib

By: Duncan M. McGreggor, Duncan M McGreggor

Overview of this book

Table of Contents (16 chapters)
Mastering matplotlib
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The pyplot scripting API


Nearly all introductory matplotlib texts and a large portion of intermediate matplotlib material focuses on the pyplot scripting layer in matplotlib. The pyplot interface offers a highly flexible and convenient means to get data into the plots with no hassles. The simple-line.py script from the last chapter highlighted this. However, this can lead one to make an incorrect assessment of pyplot.

The pyplot API is not simply a tool for beginners, especially with the advanced use of data taking place in the object-oriented API. Rather, in pyplot's simplicity rests its power. It is the right tool to use when you need the following:

  • One-off scripts

  • Instant feedback for the visualization of newly obtained datasets

  • The means to demonstrate plot features or workflow in an IPython matplotlib notebook

  • Visualization and a manual check of data from laboratory experiments

  • Ways to work through problems with a publication in a textbook or journal article, in graduate work, or for undergraduate...