Introduction to Axes (or Subplots)
Matplotlib Axes are the gateway to creating your data visualizations.
Once an Axes is placed on a figure there are many methods that can be used to
add data to the Axes. An Axes typically has a pair of Axis
Artists that define the data coordinate system, and include methods to add
annotations like x- and y-labels, titles, and legends.
Anatomy of a Figure
In the picture above, the Axes object was created with ax = fig.subplots().
Everything else on the figure was created with methods on this object,
or can be accessed from it. If we want to change the label on the x-axis, we
call , if we want to plot some data we call
. Indeed, in the figure above, the only Artist that is not
part of the Axes is the Figure itself, so the class is really the
gateway to much of Matplotlib's functionality.