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 matplotlib object-oriented API


Before we begin, a caveat about the terminology is in order. We use the phrase matplotlib object-oriented API to refer to a direct access to matplotlib's artist and backend layers. The pyplot scripting layer is also object-oriented in that it is composed of functions and instances that are object-oriented by design. The pyplot interface is built upon the OOP methodologies utilized by matplotlib. The distinction that we attempt to make in this section is that we will be creating these objects directly instead of using a scripting layer that does the same for us.

As with the previous section, we acknowledge that the object-oriented API for matplotlib has been covered in great detail in other materials and we will therefore simply provide an overview of the interface via an example, much like with the pyplot API overview.

Of the many circumstances that require fine-grained control over the elements of a plot or the customized use of the backend, a very clear...