Can you please clarify some Matplotlib terminology:
Axes is the plural of axis. A subplot usually has an x-axis and a y-axis, which together form the two axes of the subplot.
Let's talk in terms of function/class names:
Figure.add_subplot
or pyplot.subplot
return a AxesSubplot
object. This in turn contains a XAxis
and a YAxis
object.
fig = plt.figure()
ax = fig.add_subplot(111)
x = ax.xaxis
print(type(ax)) # matplotlib.axes._subplots.AxesSubplot
print(type(x)) # matplotlib.axis.XAxis
XAxis
is derived from base class Axis
.
AxesSubplot
is derived from SubplotBase
and Axes
.