Line Graph Explained: How to Make, Read and Report It

By Dr. Faheem Afzal Shah, Founder, StatFAS.com · Tool: Line Graph Maker

A line graph answers the question "how does this change?" By connecting points along an ordered axis, usually time, it lets the eye see direction, rate of change, turning points and differences between groups. It is the natural chart for repeated measurements, growth curves and dose–response patterns. This guide explains when to use it, how the slope behind a line is computed, how to read it critically, and how to report it, with a worked example you can verify.

What is a line graph?

A line graph plots values on the vertical axis against an ordered or continuous variable on the horizontal axis and joins the points with line segments. The joining line carries a claim: that it makes sense to talk about values in between the measured points, which is true for time, dose or distance, but not for unordered categories. For those, use a bar plot.

When should you use a line graph?

Line graph versus other charts. If the x-axis has unordered categories, the line implies a continuity that does not exist. If you only have two time points, a simple pair of bars or a slope chart may be clearer. When individual trajectories matter, plotting them lightly behind the group mean avoids hiding variability (Weissgerber et al., 2015).

The mathematical foundation

The overall trend of a series can be summarised by the least-squares slope of y on x:

b = Σ(xi − x̄)(yi − ȳ) / Σ(xi − x̄)²

The slope is the average change in y per unit of x. Between two adjacent points the rate of change is (y2 − y1)/(x2 − x1). When several groups are plotted, the difference between their slopes is the difference in rate of change, which is what a group-by-time interaction tests. If error bars are drawn at each time point, they carry the same meaning as in a bar plot (SD, SE or confidence interval) and must be labelled.

The visual steepness of a line depends on the axis scales and the aspect ratio of the graph. Cleveland (1994) recommends choosing an aspect ratio so that the average line segment slopes at about 45°, which avoids both exaggerating and hiding trends.

Assumptions and data requirements

Original research example (illustrative)

Background. A researcher trials a weekly coaching programme to improve a test score and compares it with a control group over six weeks.

Objective and question. Do scores rise faster in the coaching group than in the control group?

Data. Group mean scores measured at weeks 1–6. The values below are invented for teaching.

Step 1: Tabulate the series

Illustrative group mean scores by week
GroupWk 1Wk 2Wk 3Wk 4Wk 5Wk 6Mean
Coaching50545963667160.5
Control50515252545552.3

Step 2: Compute the slopes

For weeks 1–6, the mean of x is 3.5 and Σ(x − 3.5)² = 6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25 = 17.5.

Coaching. The mean score is 363/6 = 60.5. The cross-products are 26.25, 9.75, 0.75, 1.25, 8.25 and 26.25, which sum to 72.5. Slope = 72.5 / 17.5 = 4.14 points per week.

Control. The mean score is 314/6 = 52.33. The cross-products sum to 17.0, so slope = 17.0 / 17.5 = 0.97 points per week.

The difference in slopes is 4.14 − 0.97 = 3.17 points per week.

Step 3: Check the plausibility

The coaching group rose from 50 to 71, a total of 21 points over 5 intervals (4.2 per interval), close to the fitted slope of 4.14. The control group rose from 50 to 55, i.e. 5 points over 5 intervals (1.0 per interval), close to 0.97. Both groups start at 50, so the gap grows steadily from zero to 16 points at week 6.

Step 4: Interpret

The lines fan out from a common starting point, which is the visual signature of a group-by-time interaction: the coaching group improves roughly four times as fast as the control group. This description is of the means only. To claim a real difference in trajectories, a model that accounts for repeated measures (such as a linear mixed model) is needed, with uncertainty shown by error bars or interval bands. A causal interpretation also requires that participants were randomly assigned.

How to make a line graph with the StatFAS Line Graph Maker

Open statfas.com/line-graph-maker.html.

  1. Prepare your data. One column for the x variable (time or dose) and one column per series, with a header row.
  2. Load the data and map columns. Assign the x variable and the series.
  3. Set options. Typical choices are markers, line style, colours, error bars, axis labels, axis range and title.
  4. Review the figure. Check axis labels with units, a legend or direct labels, and that the axis range does not mislead.
  5. Download. Export at a resolution suitable for publication.
Screenshot 1 (to be supplied): statfas-line-graph-maker-interface.png
Alt text: "StatFAS line graph maker interface before data entry."
Caption: The Line Graph Maker on StatFAS.com.
Screenshot 2: statfas-line-graph-example-data.png · Alt: "Weekly coaching and control scores loaded in the StatFAS line graph maker."
Screenshot 3: statfas-line-graph-settings.png · Alt: "Marker, colour and axis settings in the StatFAS line graph maker."
Screenshot 4: statfas-line-graph-result.png · Alt: "Finished line graph comparing coaching and control groups over six weeks." Use only genuine captures of the tool.

Reading a line graph

APA 7 reporting example (based on the illustrative data)

Figure 1 shows mean test scores for the coaching and control groups across six weeks. Both groups began at the same mean score (50). By week 6 the coaching group had a mean of 71 and the control group a mean of 55. The least-squares slope of the group means was 4.14 points per week in the coaching group and 0.97 points per week in the control group.

Essential elements: a numbered figure, a caption stating the measure and what any error bars represent, group sample sizes, axis labels with units, and the statistical test (for example, a mixed model with a group-by-time term) reported separately in the text. Do not present descriptive slopes of means as inferential results.

Common mistakes and troubleshooting

Limitations and alternatives

A line graph of means hides individual trajectories and the within-person structure of the data. Alternatives include spaghetti plots (one thin line per participant), small multiples, and growth-curve models for inference. For unordered categories use a bar plot; for a matrix of values over time and group, a heatmap can scale better. For summary numbers to accompany the figure, use the descriptive statistics calculator.

Frequently asked questions

When should I use a line graph instead of a bar chart?

When the x-axis is ordered or continuous, such as time or dose. Use bars for unordered categories.

How many lines are too many?

Beyond about four to six lines, readability drops. Use small multiples or highlight the lines of interest.

Should the y-axis start at zero?

Not necessarily for a line graph, but choose the range deliberately and avoid ranges that exaggerate small changes.

Should I connect points when time intervals are uneven?

Yes, but space them by true elapsed time so that the slope is not distorted.

Conclusion

A good line graph shows change honestly: an ordered axis with true spacing, sensible scales, a manageable number of lines and labelled uncertainty. When you are ready to draw one from your own data, the StatFAS Line Graph Maker provides a browser-based route, and the exported figure should be checked by you before publication.

References

Author attribution: Dr. Faheem Afzal Shah, Plant Functional Genomics and Regulatory Genomics Researcher; StatFAS.com Founder.