How to make a bar chart in SPSS from a categorical variable

You will build a simple bar chart in SPSS that shows how many cases fall into each category of a variable, such as car colour or survey response. It suits anyone who has entered data in SPSS and needs a clean graph for a report or assignment. You only need SPSS open with a categorical variable and its value labels set.

YouTube video: How to Create a Bar Chart in SPSS - Bar Graph

Caption availability is unknown. Check the CC control in the YouTube player.

Video length
4 min 4 s
Time to do it
5 minutes
Difficulty
Easy
Steps
10

What you need

Steps

  1. Open your data file in SPSS and find the categorical variable you want to chart, such as car colour. Turn on value labels so the numbers display as names.

  2. Click Analyze in the top menu, then Descriptive Statistics, then Frequencies. A Frequencies window opens.

  3. Select your variable in the left list and move it into the Variable(s) box with the arrow button.

  4. Click the Charts button, choose Bar charts, then click Continue.

  5. Untick Display frequency tables if you only want the graph, then click OK. The chart appears in the Output Viewer.

  6. Read the chart: the categories sit on the x-axis and the count of each one is the height of its bar, shown on the y-axis.

  7. To change the bar colour, double-click the chart to open the Chart Editor, then double-click any bar to open the Properties box.

  8. Open the Fill and Border tab, pick a colour, click Apply, then close the Properties box and the Chart Editor.

  9. For the same chart another way, click Graphs, then Legacy Dialogs, then Bar. Keep the Simple chart type and click Define.

  10. Move your variable into the Category Axis box and click OK. The new chart matches the first one.

Tips and common mistakes

Set value labels before charting, otherwise the bars are labelled with bare codes like 1, 2 and 3.

In the Charts dialog you can pick percentages instead of counts, which is useful when comparing groups of different sizes.

A bar chart is for categories only. For a continuous variable such as age or height, use a histogram instead.

Save your output file so the chart stays editable rather than exporting it as a flat image straight away.

Questions

What is the difference between a bar chart and a histogram in SPSS?

A bar chart shows counts for separate categories such as colours or yes/no answers, and the bars have gaps. A histogram shows the spread of a continuous variable, and its bars touch.

How do I get percentages instead of counts on the bars?

In the Frequencies window, click Charts and choose Bar charts, then select the percentage option you want before clicking Continue. The y-axis then shows percentages rather than raw counts.

Why are my bars labelled with numbers?

Value labels are switched off. Click the Value Labels button on the toolbar or set labels in Variable View, then rerun the chart.

The notes are drafted automatically from video details and general task knowledge. How the guide was prepared

Report a correction

More in School & Learning

See all