Display groups on graphs

Add grouping variables for scatterplot and similar graphs

For scatterplots and similar graphs, you can edit the data display elements to add groups. For example, the steps below describe how to add Gender as a grouping variable to this scatterplot.

  1. Click a symbol to select all of the symbols. (For more information, go to Select groups and single items on a graph.)
  2. Choose Editor > Edit Symbols.
  3. Select the Groups tab.
  4. In Categorical variables for grouping, enter Gender.
  5. Click OK.

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.

Apply grouping variables to all data displays for scatterplots and similar graphs

When you add groups for a data display element, select Apply same grouping to other data displays to use the same grouping variables for all data display elements.

For example, the following scatterplot includes symbols, connect lines, and project lines.

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

Make groups on boxplots and similar graphs look different

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. Click a box to select all of the boxes. (For more information, go to Select groups and single items on a graph.)
  2. Choose Editor > Edit Interquartile Range Box.
  3. Select the Groups tab.
  4. In Assign attributes by categorical variables, enter Gender.
  5. Click OK.

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.

Apply attributes to all data displays for boxplots and similar graphs

When you edit a data display element to add an attribute assignment variable, select Apply attribute assignments to all data displays to use the same variable for all data display elements.

For example, the following boxplot includes interquartile range (IQR) boxes and range boxes.

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
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy