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 type | Use it when | Example |
|---|---|---|
| Scatter plot with fit | Both variables are continuous and you expect a relationship | Extension against load for a spring |
| Line graph | Showing change over time or a continuous sequence | Temperature of a cooling liquid against time |
| Bar chart | Comparing a continuous quantity across categories | Mean enzyme activity at three pH buffers |
| Histogram | Showing the distribution of one continuous variable | Spread of 50 repeated reaction times |
| Box plot | Comparing distributions across groups | Plant heights under four light treatments |
| Log or log-log plot | Data spans several orders of magnitude or follows a power law | Radioactive 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.
| Relationship | Plot y against x | Gradient | Intercept |
|---|---|---|---|
| T = 2π√(L/g) | T² against L | 4π²/g | 0 |
| N = N0e-λt | ln N against t | -λ | ln N0 |
| y = axn | ln y against ln x | n | ln a |
| k = Ae-Ea/RT | ln k against 1/T | -Ea/R | ln 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.
| Check | Done? |
|---|---|
| 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 ReportFree revisions · Full refund if late · Written from scratch for your order
Frequently Asked Questions
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.
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.
Usually the instrument uncertainty for single readings or the standard error of the mean for repeats. Always state which in the caption.
Rearrange the equation into the form y = mx + c, then plot the transformed quantities, such as ln N against t for exponential decay.
Yes, if your course allows it. Remove default titles and gridlines, add proper axis labels and use LINEST for gradient uncertainty.
Below the figure in most science styles, numbered in order. Table captions usually go above the table.
Follow your course. Many introductory labs still assess hand-drawn graphs on graph paper; later modules usually expect software plots.
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.