The scripting layer
While the backend layer focuses on providing a common interface to the toolkits and rendering the primitives and containers of the artist layer, the scripting layer is the user-facing interface that simplifies the task of working with other layers.
Programmers who integrate matplotlib with application servers will often find it more convenient to work directly with the backend and artist layers. However, for the scientists' daily use, data visualization, or exploratory interactions, pyplot
—the scripting layer—is a better option. This is what we use in most of the IPython Notebooks in this book.
The pyplot
interface is much less verbose; one can get insights into one's data in very few steps. Under the covers, pyplot
uses module-level objects to track the state of the data so that the user does not have to create things like figures, axes, canvases, figure canvas managers, or preferred backends.
We will take a quick look at pyplot's
internals later in this chapter (as well...