Here is the explanation of the preceding code blocks:
- Older versions of Matplotlib accept only floating-point data types as their arguments for data. So, the months have to be represented in a numerical format.
- month_num and units_sold are Python lists representing the number of units sold in each month of a year.
- plt.subplots() allows us to define the layout of the figure in terms of the number of graphs and how they should be organized within the figure. We will learn more about it in Chapter 3, Plotting Multiple Charts, Subplots, and Figures and Chapter 6, Plotting with Advanced Features. In this case, we are using it to get access to the axes on which we are plotting the bar graph so that we can annotate them with the ...