Line Graph: How to Make It Online and Add It to Your Paper (APA7)
A line graph connects points across an ordered x-axis such as time, so you can see change and compare trajectories between groups.
What is Line Graph?
A line graph connects points across an ordered x-axis such as time, so you can see change and compare trajectories between groups.
When to use it
Use it for repeated measurements (baseline, week 4, week 8), for trends over time, and to display interactions: non-parallel lines suggest that the effect of one factor depends on the other.
Example question: How did anxiety change across four time points in the intervention and control groups?
Preparing your data
Long format: one row per participant per time point (id, group, time, score), or wide format with one column per time point. Time points must be in a meaningful order.
Example dataset (simulated; first rows of 200): id, group (Control or Intervention), time (T1 to T4), anxiety (scale score); long format.
| id | group | time | anxiety |
|---|---|---|---|
| C1 | Control | T1 | 16.9 |
| C2 | Control | T1 | 19.2 |
| C3 | Control | T1 | 17.5 |
| C4 | Control | T1 | 16.2 |
| C5 | Control | T1 | 18.8 |
| C6 | Control | T1 | 11.8 |
Download the full example CSV to practise. If the tool asks for a different layout, follow the instructions on its page.
How to run it on StatFas
- Open the Line Graph tool. You do not need an account to run an analysis.
- Enter your data or upload your file, laid out as described in Preparing your data.
- Select your variables. Choose the x-axis variable (time or ordered steps), the outcome for the y-axis, and an optional grouping variable to draw one line per group.
- Choose any options the tool offers (for example the confidence level, a post hoc test or the error bar type) and run the analysis.
- Read the results on the page. Check the assumptions first, then the test statistic, the p-value and the effect size.
- To save your results, log in or create a free account. Every analysis stays free; the account is only needed to download.
Assumptions and checks
- Only join points with lines when the x-axis is ordered or continuous. Do not draw lines between unrelated categories.
- Show error bars (preferably 95% confidence intervals) at every point.
- Use distinguishable line styles or markers so the figure works in grayscale.
- Keep the y-axis range honest; a broken or stretched axis exaggerates change.
Key numbers to look at
- Points: the mean at each time or step.
- Lines: the direction and size of change between points.
- Gap between lines: group differences at each time point.
- Parallel or crossing lines: a visual hint of an interaction that a two-way ANOVA can test.
Effect size
A figure has no effect size. Test change with a repeated-measures ANOVA and group-by-time interaction with a two-way ANOVA.
Benchmarks such as small, medium and large are conventions (Cohen, 1988), not rules. Interpret size in the context of your field.
Reporting Line Graph in APA7 style
Template
Mean Anxiety Scores Across Time by Group
[figure]
Note. Error bars show 95% confidence intervals. n = XX per group.
Worked example (simulated data)
The numbers below were computed from the example CSV above, so you can reproduce them. They illustrate the format and are not real findings.
| Group | Time | M | 95% CI (error bar) |
|---|---|---|---|
| Control | T1 | 17.51 | [16.46, 18.57] |
| Control | T2 | 16.98 | [15.22, 18.73] |
| Control | T3 | 17.15 | [15.42, 18.88] |
| Control | T4 | 16.12 | [14.81, 17.44] |
| Intervention | T1 | 19.15 | [17.69, 20.61] |
| Intervention | T2 | 14.69 | [13.41, 15.97] |
| Intervention | T3 | 12.96 | [11.28, 14.64] |
| Intervention | T4 | 11.22 | [9.83, 12.61] |
Figure caption (APA7 style)
Figure 1
Mean Anxiety Scores Across Time by Group
Note. Error bars show 95% confidence intervals. n = 25 per group.
APA7 reminders: italicise statistical symbols (M, SD, t, F, p, r), report exact p-values to two or three decimals (use p < .001 for very small values), omit the leading zero for values that cannot exceed 1 (.45, not 0.45), and put degrees of freedom in parentheses. See the APA7 cheat sheet.
Common mistakes
- Joining unordered categories with a line.
- Omitting error bars, which hides how uncertain each mean is.
- Plotting too many lines; more than four or five become unreadable.
Related analyses and alternatives
- One-way ANOVA with repeated measures: To test change across time points.
- Two-way ANOVA with repeated measures: To test a group-by-time pattern.
- Bar Plot: For unordered categories.
Not sure which analysis you need? Use the test chooser.
Frequently asked questions
Can I use a line graph for categories like male and female?
No. Lines imply a continuous or ordered x-axis. Use a bar plot for unordered categories.
What should the figure note say?
State what the points and error bars show and the sample size per group.
References
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000
This guide is for learning and for preparing results for your own reports. You remain responsible for choosing an appropriate analysis, checking its assumptions and interpreting the results. Follow the formatting rules of your journal or institution where they differ from APA7.