Stacking the bars

Bar charts can be effective for comparing categorical distributions in different groups and we have seen that clustering the bars in different ways can make comparisons easier. An alternative way to reduce the visual separation of the bars that we want to compare is to stack them within each group.

Ordinal categorical variables

Stacked bar charts are particularly effective when the categorical variable is ordinal. An ordinal categorical variable has categories that are ordered — each category is 'between' those on either side in some sense. If the categories cannot be meaningfully ordered, the variable is called a nominal categorical variable.

For example, questionnaires often ask respondents to specify their age by ticking 'Under 20', '20 to 29', '30 to 39', etc. The recorded age is an ordinal categorical variable since each age category is between these on either side. On the other hand, the breed of sheep used by farmer (Romney, Merino, Cheviot, ...) is a nominal categorical variable since the categories are not ordered.

Stacked bar charts would be particularly useful for comparing age distributions, but less so for breeds of sheep.

Growth of roses

The data below arose from an investigation into the growth characteristics of rose cuttings. Thirty cuttings were transplanted with each of four combinations of

The four groups are therefore called A1, B1, A2 and B2. The measurement of interest from each of these groups is the growth of the roses after a period of time, classified as

Since there were equal numbers of roses of all types, the relative sizes of the bar charts are the same if we select Propn within Rose type or Percent within Rose type from the pop-up menu at the top.

Click the checkbox Stacked to change the bar chart into a stacked bar chart. Since the responses are ordinal (e.g. Strong is between Weak and Very strong), the stacked bar charts are particularly effective for comparing the groups. Observe in particular that.