An interaction plot is a simple graph that answers the question: does the effect of one factor depend on the level of another factor? This guide walks through how to draw interaction plots in SPSS, Excel, and Python, and how to interpret what parallel, crossing, or diverging lines tell you.
What an interaction plot shows
A two-way ANOVA tests three things:
- The main effect of Factor A (do the levels of A differ on average?)
- The main effect of Factor B (do the levels of B differ on average?)
- The interaction effect (does the effect of A depend on which level of B you're in?)
An interaction plot visualizes all three at once.
No interaction (parallel lines): The effect of Factor A is the same at every level of Factor B. If Factor A always increases the outcome by 5 points, it does so at both levels of Factor B.
Interaction present (lines cross or diverge): The effect of Factor A differs depending on which level of Factor B you're in. Factor A might increase the outcome by 5 points at one level of B but by 10 points at another level of B.
A worked example
A study gave students essay instructions using two factors:
- Factor A: Essay design (Freewriting or Revising)
- Factor B: Feedback timing (Immediate or Delayed)
Twenty students completed each combination. The outcome was their essay score (0 to 100).
| Essay Design | Feedback | n | M | SD |
|---|---|---|---|---|
| Freewriting | Immediate | 20 | 67.30 | 8.42 |
| Freewriting | Delayed | 20 | 67.60 | 6.32 |
| Revising | Immediate | 20 | 79.10 | 11.62 |
| Revising | Delayed | 20 | 70.95 | 10.93 |
Here is the interaction plot:

Figure 1
Essay scores by design and feedback timing.
Note. Error bars show 95% confidence intervals. Freewriting shows no effect of feedback timing (Immediate M = 67.30 vs Delayed M = 67.60, difference = −0.30). Revising shows a larger gap: Immediate (M = 79.10) > Delayed (M = 70.95, difference = 8.15). The lines are not parallel, but the interaction test did not reach significance (see below).
How to read the plot
The x-axis shows the levels of Factor A (here, the two design types). These are usually the factor with more levels or the factor you want to emphasize.
The y-axis shows the outcome, usually the mean score.
Each line represents one level of Factor B. If Factor B has two levels, you have two lines.
Line shape:
- Parallel lines (or nearly parallel): No interaction. Each factor's effect is consistent across the other factor's levels.
- Lines that cross: A possible interaction. The ranking of groups reverses (what was highest under one condition becomes lowest under another).
- Lines that diverge or converge: A possible interaction. The gap between the lines widens or narrows.
The plot shows the pattern; it does not test it. Sampling error alone makes lines slightly non-parallel, so the interaction F test is what tells you whether the pattern is larger than chance.
The two-way ANOVA behind the plot
The 2 × 2 ANOVA on the same 80 scores gave these results (Type II sums of squares; with 20 students in every cell, Type II and Type III give the same answer):
| Effect | F(1, 76) | p | Partial η² |
|---|---|---|---|
| Essay design | 12.57 | < .001 | .14 |
| Feedback timing | 3.37 | .070 | .04 |
| Design × Feedback | 3.91 | .052 | .05 |
Across both feedback conditions, revising (M = 75.03) scored higher than freewriting (M = 67.45). Immediate feedback (M = 73.20) and delayed feedback (M = 69.28) did not differ significantly.
How to report it: "As shown in Figure 1, students who revised scored higher than students who freewrote, F(1, 76) = 12.57, p < .001, partial η² = .14. The effect of feedback timing was not significant, F(1, 76) = 3.37, p = .070, partial η² = .04. The lines diverge, with revising scoring 8.15 points higher under immediate than delayed feedback and freewriting showing almost no difference (−0.30 points), but the design by feedback interaction did not reach significance, F(1, 76) = 3.91, p = .052, partial η² = .05."
The APA 7 format template
As shown in Figure X, the [Factor A] by [Factor B] interaction was [significant/not significant], F(1, df error) = X.XX, p = .XXX, partial η² = .XX. [Describe what the lines show in plain words, using the means and stating whether the difference reached significance.]
Want to see it written from data? Run this test on sample data in KyroStat: free, no file needed, and it does not use your free tests.
Figure elements:
- Title: Italics, title case, e.g., Essay scores by design and feedback timing
- X-axis label: The name of Factor A
- Y-axis label: The outcome (e.g., "Mean essay score")
- Legend: Shows which line is which level of Factor B (e.g., "Immediate" vs "Delayed")
- Figure note: Explains the error bars and states what the interaction shows
How to draw an interaction plot in SPSS
The quickest route is the ANOVA dialog itself:
- Analyze > General Linear Model > Univariate
- Move the outcome to Dependent Variable and both factors to Fixed Factor(s)
- Click Plots. Move Factor A to Horizontal Axis and Factor B to Separate Lines, then click Add
- In recent versions, tick Include Error bars and choose Confidence Interval (95.0%)
- Click Continue, then OK. The profile plot appears under the ANOVA table
For a chart you can style further:
- Graphs > Legacy Dialogs > Line
- Choose Multiple and Summaries for groups of cases, then click Define
- Under Lines Represent, choose Other statistic (e.g., mean) and move the outcome into Variable
- Move Factor A to Category Axis and Factor B to Define Lines by
- Click Options, tick Display error bars and choose Confidence intervals at 95.0%
- Click Continue, then OK
To edit the chart:
- Double-click to enter edit mode
- Right-click the lines > Properties to change line style and markers
- Add axis labels, legend title, and figure note using Text in the Properties panel
How to draw an interaction plot in Excel
- Create a data table with one row per combination of factors and one column for the outcome mean
- Rearrange so that:
- Row headers: Levels of Factor A
- Column headers: Levels of Factor B
- Cells: Mean outcome
- Insert > Chart > Line Chart (choose 2-D Line)
- Select Data > Edit to arrange the chart data so lines are traced by Factor B levels
- Add axis titles and a legend. For error bars, compute each cell's 95% CI half-width in the sheet, then use Chart Design > Add Chart Element > Error Bars > More Error Bar Options > Custom > Specify Value and select those cells. Excel's built-in Standard Error option does not use each cell's own data, so do not use it
How to draw an interaction plot in Python
import numpy as np
import pandas as pd
from statsmodels.graphics.factorplots import interaction_plot
df = pd.read_csv("scores.csv")
fig = interaction_plot(x=df["design"], trace=df["feedback"],
response=df["score"], func=np.mean)interaction_plot draws the cell means only. For 95% CI error bars, seaborn.pointplot(data=df, x="design", y="score", hue="feedback", errorbar=("ci", 95)) draws means with error bars in one call.
Interpreting interactions: What the lines tell you
Parallel lines (no interaction):
- The effect of Factor A is the same at both levels of Factor B
- Main effects of A and B are interpretable on their own
- Example: Revising is always 7 points better than freewriting, regardless of feedback timing
Lines cross (strong interaction):
- The effect of A reverses depending on B
- One factor flips the ranking of the other
- Example: Freewriting is better with delayed feedback, but revising is better with immediate feedback (fictional)
Lines diverge (possible interaction):
- The difference between the lines grows or shrinks
- One factor amplifies or reduces the effect of the other
- Example (from the data above): revising scores 8.15 points higher with immediate feedback, freewriting shows a −0.30-point difference, and the interaction test gives p = .052, so the pattern is suggestive but not significant
Common mistakes
- Reading the picture as the test. Non-parallel lines are not a significant interaction on their own. Report the interaction F and p next to the figure.
- Ignoring a significant interaction. When the interaction is significant, the main effects average over a pattern that differs by level, so describe the interaction (and simple effects) before the main effects.
- Swapping the factors. Either factor can go on the x-axis and the other can be traced by lines. If one factor has 2 levels and the other has 3, put the 3-level factor on the x-axis to avoid 3 overlapping lines
- Calling it a "plot" without showing means and CIs. Interaction plots must show the data: means with error bars or confidence intervals, not just points and lines
- Misreading line overlap. Overlapping error bars do not mean the difference is not significant. The bars show uncertainty in the individual means, not the significance of their difference
APA 7 rules for interaction plots
- Italicize F, p, M, SD and n
- Greek letters like η (in partial η²) are upright, never italic
- No leading zero on p: p = .005, not p = 0.005
- Error bar type must be stated in the figure note: "Error bars show 95% confidence intervals of the means"
- Include both a figure and a written description of the interaction
- If error bars differ in width (because n is unequal), state that in the note
When to use an interaction plot
- After a two-way ANOVA to visualize the interaction effect
- After any factorial design (2 × 2, 2 × 3, 3 × 3, etc.)
- Before or after a simple effects analysis (testing one factor at each level of the other)
- To decide whether to include an interaction term in a regression model
Do not use an interaction plot for:
- Two continuous variables (use a scatter plot instead)
- More than 2 factors (interaction plots become cluttered; consider faceted plots or separate plots per factor)
Frequently asked questions
What if I have 3 or more levels of Factor B? You can have 3+ lines on one plot, but it becomes crowded. Options:
- Keep all lines on one plot if the patterns are clear
- Draw separate plots for each combination
- Use faceting (small multiples) with one plot per level of Factor B
Can I add statistical significance stars to the plot? Yes, but it can clutter the figure. If you do, state in the figure note which comparisons are significant (e.g., "* p < .05 for the difference between lines at this level of Factor A").
What if the interaction is very small? Small interactions are still interactions. Report the effect size (ηp²) and the p value. If the interaction is statistically significant but practically small, state both facts: "Although the interaction reached significance, F(...) = X.XX, p = .XXX, ηp² = .02, the practical difference was minimal."
Should I always include an interaction plot? If you tested an interaction (which you should in a two-way ANOVA), show it. It's one of the clearest ways to communicate whether the effect of one factor depends on another.
Related guides
- How to report a two-way ANOVA in APA 7: the test results that pair with this plot
- How to report Tukey HSD tests in APA 7: post hoc tests to follow up an interaction
- Bar graphs with error bars: a simpler alternative when you have only one factor
- How to report Pearson correlation in APA 7: when both variables are continuous instead of categorical