I recently received questions about creating bar charts within Minitab and thought I'd share some information about this common task on the blog. When creating a bar chart in Minitab, you begin by going to Graph > Bar Chart. This brings up a dialog box:
The next step can prove quite vexing. In the dialog box, it can be tempting to quickly select the picture that best represents what you want your graph to look like. However, Minitab needs to know what type of data you are trying to graph. Above the pictures is a dropdown that will tell Minitab what exactly the data represent. It’s important to choose the right representation before selecting one of those pictures for Simple, Cluster, and Stack.
Let's take a look at how your selection in that dropdown menu affects the graph Minitab will create. Here is the data set we will be using for some scenarios below:
Counts of Unique Values
Don’t be scared by this option! This data representation may sound complex, but it really isn’t. If you want to simply count the number of occurrences of the items in a column and then have Minitab display it as a bar graph, then this is what you want. Your data set is in raw form, and the type of data is probably categorical in nature. In the example below, the unique values for Color are Blue and Red. Here are the counts of how many times Blue and Red appear in the column:
Unique values can also be numeric as well, but this doesn’t make them necessarily continuous in nature. The labels “1”, “2” and “3” in a column could simply be referring to machine number.
A Function of a Variable
You may be thinking “What’s my variable here?” or “Why are we talking about functions? I thought we left that in algebra class!” The real need for this representation is when you aren’t completely done with the manipulation of the data in your worksheet. You may want the bars to represent some statistic like the mean or standard deviation, or maybe even the sum. Essentially, you are asking Minitab to calculate one more thing for you and then display it as a bar chart. Here are the various functions available for Minitab to perform:
Example of a Bar Chart where the Function is the Mean:
Values from a Table
If you are working with summary data (in other words, they require no further manipulation), then this is the option for you. Let’s look at this table; each color has a corresponding length.
Since you only have one column of values, this narrows down what you have to choose within the Bar Chart dialog window. Go to Graph > Bar Chart > Values from a Table > One Y > Simple. Select ‘Length’ for Graph Variables and ‘Color’ for Categorical Variable. The resulting graph should look something like:
We chose “One Y” because we were only dealing with one column of numeric values. You might be asking what to do if I had the data in this format:
Minitab can still create the same graph from the data format above, but it would require more experience on the part of the user to know what menu path to choose. In some instances you may also have to remove some unwanted labels from the graph after creating it.
To counter some confusion when creating Bar Charts, keep in mind that Minitab generally likes data in a "stacked" arrangement, where each numeric and categorical variable has its own column (as in the initial format of our Color and Length data). This will hopefully yield better luck when using the Bar Chart menus.
For those who were curious as to what menu path to take for the data table above, it’s Graph > Bar Chart > Values from a Table > Two-Way Table > Cluster. Select ‘Blue’, ‘Green’, ‘Red’, and ‘Yellow’ as your Graph Variables and the column that contains the word “Length” as your Row Label.
I hope these tips help when creating your next Bar Chart!