Categories

You can reorder and exclude categories in a pie chart, a chart with a categorical axis, or a paneled chart.

How to Reorder and Exclude Categories

  1. Select any graphic element in the chart.
  2. If the Properties window is not displayed, from the menus choose:

    Edit > Properties

  3. Use the Categories tab to specify the order of the categories and which ones you want to exclude.
  4. Click Apply.

Using the Categories Tab

Variable. Select the variable whose categories you want to reorder or exclude.

Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Editor collapses any categories whose percentage of the total is less than the specified number. Use this feature to combine categories that are so small that you don't need to display them separately. For example, if you have a pie chart with many categories, consider collapsing categories with a percentage of 10 and under. The percentage is based on the statistic shown in the chart. So if the chart is showing means, the percentage is calculated by summing the mean values, which may not be what you want. Therefore, you should use the feature only with statistics for which it makes sense to sum the values, such as count and sum.

Tip

You can change the label for the collapsed category by editing it directly in the chart after you click Apply.

Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.

Note: Unless you select the Custom option, the Order list does not reflect the order in which the categories will appear in the chart. You can see the new order in the chart by clicking Apply. If the new order is not what you expect, just undo the reordering (select Undo from the Edit menu).

  • Custom. Uses the order shown in the Order list.
  • Label. Uses the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick labels.
  • Statistic. Uses the statistic calculated on the y axis for sorting the variable's categories. Examples of statistics include counts, percentages, and means. If the chart is mixed (a combination of two different data types such as bars and lines), stacked, or clustered, the sort is across the other sets of categories in the chart. For example, consider a clustered bar chart with Employment Category as the categorical axis variable and Gender as the legend variable. If you are sorting categories in the Employment Category variable (that is, sorting the clusters on the x axis), the Chart Editor considers the total of both genders in each employment category when sorting. The sort order of the genders (bars) in each cluster does not change. For box plots, the statistic is always the median of the variable.
  • Value. Uses the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female). The value is displayed in parentheses in the Order list.

Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort by changes to Custom.

Note: You can also use the rescaling tool to exclude categories on the categorical axis. However, this tool modifies the scale of all axes in the chart. See the topic Changing Axis Scales for more information.

Excluded. This list shows the categories that are excluded from the chart. To exclude categories from the chart, select a category name in the Order list, and then click the X button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list. Other chart elements associated with a category (for example, annotations) can be hidden when you exclude a category. If elements you expect to see aren't displayed, move all excluded categories back to the Order list.

Margins. Creates a margin around the data. You specify a percentage (0 to 50) of the inner frame to use for the margin. The margin appears perpendicular to the categorical axis. For example, if you set the upper margin to 5% for the vertical axis, a margin whose thickness is 5% of the data area runs along the top of the data frame.