Written and maintained by CASRAI Editorial Board
Last updated
SPSS builds a scatterplot through Chart Builder, and the same tool covers all three shapes worth knowing: a simple X-Y scatter, a grouped scatter that colors points by a categorical variable, and a scatterplot matrix that lays out every pairwise combination of several continuous variables at once. Once the chart exists, a fit line — straight-line or Loess — gets added afterward in the Chart Editor, not in Chart Builder itself. This guide covers all three chart types, when a grouped scatter is the better choice over a matrix (and vice versa), and how to add and read a fit line.
Building a simple scatterplot in Chart Builder
Go to Graphs > Chart Builder. In the Gallery tab, select the Scatter/Dot category and drag the Simple Scatter icon onto the canvas. Drag one continuous variable onto the x-axis drop zone and the other onto the y-axis drop zone, then click OK. If you just need one scatterplot with no other output from the same run, Graphs > Legacy Dialogs > Scatter/Dot reaches the same simple scatter faster through a chooser dialog, at the cost of the Chart Builder’s live preview.
Grouped scatterplot: coloring points by a third variable
The Grouped Scatter icon, in the same Scatter/Dot category, builds the identical x-axis/y-axis scatter but adds a Set Color drop zone. Drag a categorical variable there — treatment arm, site, sex, condition — and SPSS colors each point by group and adds a legend automatically.
The reason to reach for this over a plain scatter isn’t decoration: it’s the fastest visual check for whether the X-Y relationship itself differs across groups — a possible interaction, not just a shift in level. Paired with a fit line per group (see below), a grouped scatter shows you differing slopes at a glance, before you commit to testing that interaction formally in a regression model.
Scatterplot matrix: many variable pairs at once
Choose the Scatterplot Matrix icon instead, and drag several continuous variables into its single variable list (rather than separate x/y boxes). SPSS lays out every pairwise combination as a grid of small scatterplots — three variables produce a 3×3 grid, four produce 4×4, and so on. This is a screening tool: a fast way to spot which pairs among many candidate variables look related, worth a closer look, or worth dropping, before building out a full correlation matrix or entering variables into a regression.
Grouped scatter or matrix — which answers your actual question
The two tools answer different questions and aren’t interchangeable:
- Use a grouped scatter when you have one specific X-Y pair and a categorical third variable, and the question is “does this relationship change across groups?” That’s an interaction question, and color-coding plus per-group fit lines is the direct visual answer.
- Use a scatterplot matrix when you have three or more continuous variables and no natural grouping factor, and the question is “which of these pairs are worth investigating at all?” A matrix has no color-by-group option — it’s built for breadth across pairs, not depth on one relationship.
Trying to force a matrix to answer the grouped question (or vice versa) is the usual mismatch: a matrix with a dozen tiny panels is the wrong place to judge whether two group’s slopes diverge, and a single grouped scatter can’t screen five unrelated variable pairs at once.
Adding a fit line in the Chart Editor
Chart Builder draws the points; the fit line comes from the Chart Editor afterward. Double-click the finished chart in the Viewer to open it, then use the Elements menu:
- Elements > Fit Line at Total adds one line across every point on the chart. A Properties dialog opens with a Fit Method choice — Linear fits an ordinary least-squares straight line; Quadratic and Cubic allow curvature; Loess fits a smoothed, locally-weighted curve instead of forcing one global equation, which is useful specifically for checking whether a straight line is even the right shape before you commit to one in a regression — a Loess curve that visibly bends where a straight line stays flat is a sign of non-linearity a correlation coefficient alone won’t tell you.
- Elements > Fit Line at Subgroups becomes available once the chart has a grouping/color variable (i.e., on a grouped scatter) and draws a separate fit line per group, in each group’s own color — the direct visual test for differing slopes across groups.
The same Properties dialog can attach a label showing the fit’s R² value directly on the chart, and, for a linear fit, add confidence bands around the line (mean or individual prediction interval). Close the Chart Editor and the edited chart is saved into the Viewer output as-is.
A scatterplot matrix doesn’t offer this same one-click way to add a fit line to every panel at once — if a specific pair from a matrix needs a fit line, rebuild that one pair as its own simple or grouped scatter.
Reading the result
A fit line on a scatterplot is diagnostic, not inferential — it shows a pattern, it doesn’t test one. The R² label option shows how much variance the line explains, not Pearson’s r itself; if you need the coefficient (and its significance test) reported properly, run it through Bivariate Correlations, and see the correlation coefficient guide for what the statistic itself measures and when Spearman’s rho is the better choice instead of Pearson’s r. A handful of extreme points can pull a linear fit noticeably; comparing the Linear and Loess lines on the same chart is a quick way to notice that before it quietly biases a downstream regression model. New to SPSS generally, or deciding whether it’s the right tool for the analysis? See what SPSS is and who uses it.
Frequently asked questions
Does the fit line’s label give me a correlation coefficient?
No. The “R² Linear” label SPSS can attach to a fit line is the coefficient of determination for that specific line, not Pearson’s r. To report r itself, with its significance test, run Analyze > Correlate > Bivariate separately.
Should I use a Linear or a Loess fit line?
Start with Linear, since it’s what most downstream analyses (correlation, simple regression) actually assume. Add a Loess line to the same chart as a check: if it tracks close to the straight line, linearity is a reasonable assumption; if it visibly curves away, that’s a sign to reconsider before running a linear model on the same variables.
Can I add one fit line to every panel of a scatterplot matrix?
Not in one step. Fit Line at Total/Subgroups apply to a single simple or grouped scatter. For a fit line on one specific pair from a matrix, rebuild that pair as its own scatter.
What does a grouped scatterplot show that a matrix can’t?
Whether the strength or direction of one specific X-Y relationship changes across levels of a third, categorical variable — an interaction check. A matrix screens many pairs for a relationship at all, with no grouping/color dimension built in.








