Scatterplot in SPSS
Cheatsheet
About
The boxplot is a visual representation of a dataset’s distribution, showing the median, quartiles, and outliers. It is useful for comparing distributions between groups and identifying outliers within a single group.
- You have SPSS installed, ideally version 28.0 or later.
- You can follow instructions to select, click and drag elements in SPSS.
Your data should be structured in a way that makes it easy to plot. The ideal structure is long, i.e. one where each column represents a variable and each row an observation (Figure 1). You can either reshape your data in R or move cells manually in a spreadsheet program to achieve the desired structure. For boxplots comparing more than one group of data, a categorical variable representing the group should be present in the data.
1 Data
For this cheatsheet we will use part of the possums dataset used in BIOL2022 labs.
2 Import data
Open SPSS and import the data file:
File
>Open
>Data...
- Select the downloaded file
possums.xlsx
- If there are multiple sheets, select the one with the data in the Worksheet dropdown
- Check that the data is correctly identified and click
OK
3 Plot
- Go to
Graphs
>Chart Builder...
- If a warning box appears on “measurement level”, click
OK
(should be safe to ignore and you can fix issues later).
- If a warning box appears on “measurement level”, click
- Select boxplot from the gallery at the bottom of the window.
- Drag the boxplot icon to the canvas.
- Drag one continuous variable to the
X-Axis
box. - Drag one continuous variable to the
Y-Axis
box. - Check the “Total” bpx in “Linear Fit Lines” to add a regression line to the plot.
- Click
OK
to generate the plot.