Bar charts

Bar charts are useful for summarizing categorical variables. For example, you can use a bar chart to show the number of men and the number of women who participated in a survey, or you can use a bar chart to show the mean salary for men and the mean salary for women.

How to create a simple bar chart

  1. In the Chart Builder, click the Gallery tab and select Bar in the Choose From list.
  2. Drag the Simple Bar icon onto the canvas.
  3. Drag a categorical (nominal or ordinal) variable to the x-axis drop zone. You can use a scale variable, but the results will be useful in only a few special cases. A bar chart looks best with a limited number of distinct values. If you create a bar chart with a scale x axis, the bars will be very skinny because each bar is drawn at an exact value, and the bar cannot overlap other continuous values.
  4. Specify a statistic in the Element Properties tab. The result of any statistic determines the height of the bars. If the statistic you want does not appear in the Statistic list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available. There may be other chart type limitations. For example, error bar charts can be calculated only for specific statistics.

How to create a 3-d bar chart

  1. In the Chart Builder, click the Gallery tab and select Bar in the Choose From list.
  2. Drag the Simple 3-D Bar icon onto the canvas.
  3. Drag categorical (nominal or ordinal) variables to the x- and z-axis drop zones.
  4. Specify a statistic in the Element Properties tab. The result of any statistic determines the height of the bars. If the statistic you want does not appear in the Statistic drop-down list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available. There may be other chart type limitations. For example, error bar charts can be calculated only for specific statistics.

Additional features

Clustering and stacking. Clustering and stacking add dimensionality within the chart. Clustering splits one bar into multiple bars, and stacking creates segments in each bar. Be careful that you choose the right statistic for stacking. When the values are added together (stacked), the result must make sense. For example, adding and stacking mean (averaged) values is not usually meaningful. For more information about specifying stacking and clustering, see Adding and editing grouping variables . The gallery also provides options for these charts.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.