This tutorial will cover the topic of stack plots. Our discussion breaks down as follows:
- Stack Bar Graphs
- Stack Line Charts
1. Stack Bar Graphs
Stack plots are plots that stack one on top of each other so that you can see how they relate to the totals. Stack plots allow you to break down bar graphs or line charts into component pieces to see the components more clearly. The problem with stack plots is that sometimes they can be hard to interpret.
Suppose that a company spent a certain number of millions of dollars over these five-year intervals, as shown in the graph below. So, in 1985, they spent $10 million. In 1990, they spent a little bit less, and so forth. It looks their spending increased significantly in the last ten years or so.
- What a stack plot will do is allow us to see exactly where that spending breakdown occurred. Look at the stack bar graph below, which breaks out each measured year's spending into its components:
- Operations, which is the day to day business of the company
- Marketing, which is the promotion side of the business
- If you look at the stack bar graph, you can see that operations (the green component) have grown a little bit over the years that the company has been in business, perhaps due to inflation. The green bars stay about the same height throughout this period of time.
- The marketing budget in yellow, however, has really proliferated over that same period of time.
If the company is looking to cut costs, do you think they would cut from the operations budget or the marketing budget? Well, perhaps they'll cut from marketing because they can see that, by the year 2010, marketing and operations are costing about the same amount.
- You can also see that the marketing budget didn't increase or decrease significantly within the five years from 2005 to 2010, as the size of the yellow ribbons is approximately the same size in those two years. This is simply another way to use this type of breakdown to analyze the data.
- Stack Plot
- A bar graph or line chart that is subdivided into its components so that the comparisons, as well as the totals, can be seen.
2. Stack Line Charts
A stack line chart can be problematic because they are often very hard to read. It is difficult to tell whether the values are cumulative or individual.
Suppose there are four different boutique stores in different locations that a company owns. They want to know how the business is doing in each of these four markets.
- Based on this graph, it's hard to tell whether the New York store is doing poorly because it's at the bottom, or whether these are stacked on top of each other. If they are stacked, then the Miami store is doing the worst because its difference is the least from the next lowest one. Does the Miami store make $250,000 on its own? Or is it a total of $250,000 between the four stores and each of these are components?
It's hard to tell whether these are added values or individual values. You can make it clearer to interpret by making the lines ribbons instead, as shown below.
Now you can see what revenue each store accounted for, in each measured month. By using ribbons instead of lines, it is clearer that you're talking about adding the values, as opposed to individual values.
- Stack Line Chart
- A line chart where the lines represent cumulative amounts rather than individual amounts. These are typically done with different colored "ribbons" to make it clearer that we are talking about totals.
Stack plots are used when two or more data sets are to be shown on the same set of axes, and we are interested in their sum as well. Stack plots are also used to break down one data set by its components. We learned about tow different types of stack plots: stack bar graphs and stack line charts. Different colors typically are used to distinguish the components. On a line chart, we typically use ribbons instead of straight lines to indicate the size of the component, which shows that we're talking about stacked groups instead of individual lines.