STEM Guide

How to Make Scientific Graphs for Lab Reports

Choose the right graph, label axes with units, add error bars, fit a line, linearise curves to find constants and write captions markers expect.

Updated October 2026 · 7 min read

Knowing how to make scientific graphs well can lift a lab report by a whole grade band. A good graph shows the relationship in your data at a glance and lets the reader check your analysis.

This guide covers choosing the graph type, labeling axes, error bars, lines of best fit, linearising curves to extract constants, reading gradients and writing captions. It includes a worked pendulum example and short plotting code.

Six Things Every Scientific Graph Needs

  • The independent variable on the x-axis and the dependent variable on the y-axis.
  • Axis labels with quantity and unit, such as "Time, t / s".
  • Sensible scales that use most of the plotting area.
  • Data shown as points, with error bars where uncertainty is known.
  • A line or curve of best fit, not a dot-to-dot line.
  • A numbered caption that says what the graph shows.

Choose the Right Type of Graph

The graph type follows from your variables. Picking the wrong one hides the relationship you are trying to show.

Graph typeUse it whenExample
Scatter plot with fitBoth variables are continuous and you expect a relationshipExtension against load for a spring
Line graphShowing change over time or a continuous sequenceTemperature of a cooling liquid against time
Bar chartComparing a continuous quantity across categoriesMean enzyme activity at three pH buffers
HistogramShowing the distribution of one continuous variableSpread of 50 repeated reaction times
Box plotComparing distributions across groupsPlant heights under four light treatments
Log or log-log plotData spans several orders of magnitude or follows a power lawRadioactive count rate against time

Pie charts and 3D effects rarely belong in a lab report. They make values harder to read and are often marked down.

Axes, Labels and Units

Axis labels must name the quantity and give its unit. The most widely accepted format is "quantity / unit", such as "Length, L / m", which follows the convention that the plotted numbers are the quantity divided by its unit.

  • Some courses use brackets instead, as in "Length (m)". Follow your department's style and use it consistently.
  • Choose scales that spread the data over at least half of each axis.
  • Start an axis at zero only when zero matters, for example when you need the intercept.
  • Use powers of ten in the label for very large or small values, such as "Current, I / 10-3 A", or use a prefix: "I / mA".

Tick marks should fall on round numbers. Gridlines help when reading values from a hand-drawn graph, but keep them light on digital plots.

Error Bars

Error bars show the uncertainty in each plotted point. They let a reader judge whether a trend is real or whether two values genuinely differ.

  • Single measurements: use the instrument uncertainty, such as ±0.5 mm for a ruler read to the nearest millimeter.
  • Repeated measurements: use the standard error of the mean, or half the range if your course prefers that.
  • Derived quantities: propagate the uncertainty, for example the uncertainty in T² is 2T × ΔT.

Always say in the caption what the error bars represent. "Error bars show ±1 standard error of the mean (n = 5)" is far clearer than an unlabelled bar.

Lines and Curves of Best Fit

A line of best fit summarizes the trend; it should not pass through every point. Join points dot to dot only when there is no expected relationship, which is rare in physics and chemistry.

  • For straight-line data, use least-squares linear regression in software, or draw a line by eye with roughly equal scatter on each side.
  • Do not force the line through the origin unless theory says it must pass through zero and you have checked the intercept.
  • For curved data, fit the model the theory predicts, such as exponential decay, rather than a high-order polynomial.
  • Report the gradient and intercept with units and uncertainties.

To estimate the gradient's uncertainty by hand, draw the steepest and shallowest lines that still pass through the error bars. Half the difference in their gradients is a fair estimate.

Linearising Data to Find Constants

Many relationships in science are not straight lines, but you can rearrange them so that a plot becomes linear. The gradient or intercept then gives the constant you want.

RelationshipPlot y against xGradientIntercept
T = 2π√(L/g)T² against L4π²/g0
N = N0e-λtln N against t-λln N0
y = axnln y against ln xnln a
k = Ae-Ea/RTln k against 1/T-Ea/Rln A

Worked example: g from a pendulum. Lengths L = 0.20, 0.40, 0.60, 0.80 and 1.00 m give T² = 0.81, 1.60, 2.42, 3.21 and 4.03 s². A least-squares fit of T² against L gives a gradient of 4.03 s²/m and an intercept close to zero.

Since the gradient equals 4π²/g, g = 4π² / 4.03 s²/m = 39.48 / 4.03 = 9.80 m/s². That is within 0.1% of the accepted 9.81 m/s², and the near-zero intercept supports the model.

Plotting with Python

Most courses accept graphs from Excel, Python, MATLAB or R. This short Matplotlib script plots the pendulum data with error bars and a fitted line.

import numpy as np
import matplotlib.pyplot as plt

L = np.array([0.20, 0.40, 0.60, 0.80, 1.00])    # m
T2 = np.array([0.81, 1.60, 2.42, 3.21, 4.03])   # s^2
err = np.full_like(T2, 0.05)                    # s^2

m, c = np.polyfit(L, T2, 1)
plt.errorbar(L, T2, yerr=err, fmt='o', capsize=3, label='Data')
plt.plot(L, m * L + c, label=f'Fit, gradient = {m:.2f} s$^2$/m')
plt.xlabel('Length, L / m')
plt.ylabel('Period squared, $T^2$ / s$^2$')
plt.legend()
plt.savefig('pendulum.png', dpi=300)

In Excel, add a trendline and tick "display equation", but use LINEST if you need the gradient's uncertainty. Export at high resolution, and remove the default chart title in favor of a proper caption.

Reading Gradients and Intercepts

When you read a gradient from a graph, use a large triangle that covers most of the line. Small triangles magnify reading errors.

Always give the gradient a unit: it is the y unit divided by the x unit. A gradient of extension against force, for instance, has units of m/N, and its reciprocal is the spring constant in N/m.

An intercept that should be zero but is not can reveal a systematic error, such as a zero error on a balance or a pendulum length measured to the wrong point. Mention it in your discussion.

Captions, Presentation and a Final Checklist

Figure captions go below the graph and table captions above, in most science styles. A caption should say what is plotted and any key detail, so the graph makes sense on its own.

Example caption. Figure 2. Period squared against pendulum length for a 50 g bob. Error bars show ±0.05 s². The solid line is a least-squares fit with gradient (4.03 ± 0.02) s²/m.

CheckDone?
Correct graph type for the variables☐
Independent variable on the x-axis☐
Labels with quantity and unit on both axes☐
Scales fill the plotting area☐
Error bars shown and explained☐
Best-fit line, not dot-to-dot☐
Gradient and intercept with units☐
Numbered caption below the figure☐

Use a graph when the pattern matters and a table when exact values matter. Many reports need both: raw data in a table, the trend in a graph.

How STEM Donkey Helps with Scientific Graphs

Send your raw data, the lab handout, the software you are expected to use and the report template or rubric. Tell us how your department wants axes labeled and which uncertainty method it teaches.

You receive a custom lab report or analysis written from scratch, with correctly chosen and labeled graphs, fitted lines, gradients with uncertainties and captions, built from your own measurements and never invented data. It is for study and reference. Free revisions within the scope of your original request are included.

Want Your Data Plotted and Analyzed Properly?

Send your raw data and lab handout. You get a custom report with clear graphs, fitted lines, uncertainties and a discussion of what they show.

Order Your Lab Report

Free revisions · Full refund if late · Written from scratch for your order

Frequently Asked Questions

Which variable goes on the x-axis?

The independent variable, the one you control or change, goes on the x-axis. The dependent variable, the one you measure in response, goes on the y-axis.

Should a line of best fit go through the origin?

Only when theory says the relationship passes through zero and your data supports it. Otherwise let the fit find its own intercept and comment on its value.

What should error bars represent?

Usually the instrument uncertainty for single readings or the standard error of the mean for repeats. Always state which in the caption.

How do I get a straight line from curved data?

Rearrange the equation into the form y = mx + c, then plot the transformed quantities, such as ln N against t for exponential decay.

Can I use Excel for lab report graphs?

Yes, if your course allows it. Remove default titles and gridlines, add proper axis labels and use LINEST for gradient uncertainty.

Where does the figure caption go?

Below the figure in most science styles, numbered in order. Table captions usually go above the table.

Should I draw graphs by hand or on a computer?

Follow your course. Many introductory labs still assess hand-drawn graphs on graph paper; later modules usually expect software plots.

How many data points do I need for a good graph?

Aim for at least five or six, spread evenly across the range. More points give a more reliable gradient and show whether the relationship really is linear.