Display groups on graphs

About groups

You can represent different groups on a graph so that you can easily compare groups. For example, you can create a scatterplot of Weight vs. Height for women and Weight vs. Height for men.

Minitab offers several ways to display groups on your graph; however, not all the options are available for all graphs or worksheet arrangements.

Groups are overlaid on the same graph

Overlaid groups are effective when you have relatively few categorical levels, or if relatively small differences are visible if the groups share the same graph.

Scatterplot with symbols

The steps below describe how to add Gender as a grouping variable to this scatterplot.
  1. Double-click the graph.
  2. Double-click a symbol. (For more information, go to Select groups and single items on a graph.)
  3. On the Groups tab, in Categorical variables for grouping, enter Gender.
The symbols for males (M) are now red squares to differentiate them from the symbols for women (F). The attributes for each level of the Gender variable are also described in the legend.

Scatterplots with other data displays

The steps below describe how to add Year as a grouping variable to this scatterplot, which contains symbols, connect lines, and project lines.
  1. Double-click the graph.
  2. Double-click a symbol. (For more information, go to Select groups and single items on a graph.)
  3. On the Groups tab, in Categorical variables for grouping, enter Year.
  4. Check Apply same grouping to other data displays to use the same grouping variables for all data display elements.

If you edit the symbols to add Year as a grouping variable and do not select Apply same grouping to other data displays, only the symbols show the groups. If you select this option, then the groups are applied to all of the data display elements.

Not selected
Selected

Boxplots with groups

For boxplots and similar graphs, groups are represented by different locations on the axis. For example, in this boxplot, the labels on the x-axis indicate which group each box belongs to.
You can also use color and other attributes to distinguish between groups. For example, to assign an attribute variable for Gender in the boxplot above, do the following.
  1. Double-click the graph.
  2. Double-click a box to open the Edit Interquartile Range Box dialog box. (For more information, go to Select groups and single items on a graph.)
  3. On the Groups tab. in Assign attributes by categorical variables, enter Gender.
The boxes for males (M) are now red to differentiate them from the boxes for women (F). The colors for each level of the Gender variable are also described in the legend.

Boxplots with additional data displays

The steps below describe how to different attributes to a grouping variable in a boxplot, which contains interquartile range (IQR) boxes and range boxes.

  1. Double-click the graph.
  2. Double-click a box to open the Edit Interquartile Range Box dialog box. (For more information, go to Select groups and single items on a graph.)
  3. On the Groups tab, in Assign attributes by categorical variables, enter Activity.
  4. Check Apply same grouping to other data displays to use the same grouping variables for all data display elements.
If you edit the range boxes to add Activity as an attribute assignment variable, but you do not select Apply attribute assignments to all data displays, then only the range boxes change colors to represent the levels of Activity. If you select this option, then the IQR boxes also change color.
Not selected
Selected

Groups are in separate panels of the same graph

Paneling can be effective, for example, when you want to show the distinction between many categorical levels, or when data displays overlap (as with histograms).

To add panels to a graph:
  1. Right-click the graph and choose Panel.
  2. In By variables with groups in separate panels, enter a variable to specify the panels.

Groups are on separate graphs

Display each group on a separate graph when you want to examine one group at a time.

To create separate graphs of groups:
  1. In the graph creation dialog box, click Multiple Graphs.
  2. Do one of the following:
    • If you have unstacked data, click the Multiple Variables tab and choose On separate graphs.
    • If you have stacked data, click the By Variables tab and enter a grouping variable for groups on separate graphs.