Matplotlib Application Interfaces (APIs)
Matplotlib has two major application interfaces, or styles of using the library:
An explicit "Axes" interface that uses methods on a Figure or Axes object to create other Artists, and build a visualization step by step. This has also been called an "object-oriented" interface.
An implicit "pyplot" interface that keeps track of the last Figure and Axes created, and adds Artists to the object it thinks the user wants.
In addition, a number of downstream libraries (like pandas and xarray) offer
a plot method implemented directly on their data classes so that users can
call data.plot().
The difference between these interfaces can be a bit confusing, particularly given snippets on the web that use one or the other, or sometimes multiple interfaces in the same example. Here we attempt to point out how the "pyplot" and downstream interfaces relate to the explicit "Axes" interface to help users better navigate the library.