The following is the explanation of the code:
- rows is the list of years and columns is the list of battery ratings. They are plotted as rows and columns of the table in the plot.
- data is the number of units sold for each rating of the battery, in a given year, for example, 75 units of 7 Ah batteries sold in 2011.
- values is the list specifying the scale for the y axis with increments of 100, starting with zero, up to six hundred. This being a stacked bar chart, it should cover the sum total of a given battery rating across all years (the maximum in this case is 576).
- plt.cm.OrRd() specifies the range of colors with varying intensity; there are pre-defined colormaps in Matplotlib. We will cover these in Chapter 4, Developing ...