The hierarchy of pyplot (plt), ax, and figure
The plt is higher level api. In order to finely control the detail of a plot, it is better to use ax and/or figure instead.
- figure:
- Kind of the canvas
- axes:
- Which is definitely not only the axis in the plot
- Include any objects in the plots
- Contain anything we need to modify the detail of the plot
- axis:
ax.xaxis
andax.yaxis
the axis in the plot