Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
The independent variable goes on the horizontal axis (the x-axis), and the dependent variable goes on the vertical axis (the y-axis). If you manipulated one variable to see what happens to another, the one you manipulated is the independent variable and belongs on x. The outcome you measured belongs on y.
The short answer: independent on x, dependent on y
Published references state the convention in the same terms. A graphing guide in the Journal of Wrist Surgery says that, for most purposes, the horizontal axis (abscissa, X axis) represents the independent variable and the vertical axis (ordinate, Y axis) represents the dependent variable. John McDonald’s Handbook of Biological Statistics gives the same instruction and adds a working test: put the variable you think causes the changes on the X axis.
For definitions of the two terms, see the independent vs dependent variable entry. If your study is observational and you use the words explanatory and response instead, the placement is the same; see explanatory variable vs response variable.
Why the independent variable goes on the x-axis
The convention follows the logic of cause and prediction: the variable you set, choose or suspect to drive the change goes on x, and the resulting value is read on y. McDonald’s phrasing is that the variable you think causes the changes goes on X.
The NIST/SEMATECH e-Handbook of Statistical Methods describes the scatter plot the same way: the vertical axis shows variable Y, usually the response variable, and the horizontal axis shows variable X, usually some variable suspected to be related to the response. The word “usually” matters, and the section on exceptions below returns to it.
A short annotated example
This example is hypothetical and used only to show the reasoning. Suppose a lab incubates cell cultures at five set temperatures and then counts viable cells in each culture.
- Which variable did the researcher set? Temperature. It is the independent variable, so it goes on the x-axis.
- Which variable was measured as the result? The viable cell count. It is the dependent variable, so it goes on the y-axis.
- Which graph type fits? Both variables are numeric, so a line diagram or a scatter plot fits. The Journal of Wrist Surgery guide recommends line diagrams or scattergrams when the independent and dependent variables are both numeric.
- Label both axes. Name each variable and give its unit, for example “Temperature (°C)” on x and “Viable cells” on y.
When the rule bends
Time always goes on the x-axis
The Journal of Wrist Surgery guide states that time is always on the X axis, and that line graphs treat the X values as a continuous variable such as time, temperature or pressure. When you plot a measurement over time, time is the x variable even if you did not manipulate it.
Depth below the surface in oceanography
McDonald notes that oceanographers often put distance below the surface of the ocean on the Y axis, and warns against doing this unless you are sure it is a strong tradition in your field. If your discipline has such a tradition, follow it and label the axes clearly. If not, use the default.
Observational data and the word “usually”
NIST says Y is usually the response and X is a variable we suspect may be related to it. In observational data nobody assigned the values, so deciding which variable goes on x is a judgment about which one you treat as the predictor. State that choice in the caption or methods, and see scatterplot interpretation and bivariate data for how paired measurements are read. Correlation alone does not show that x causes y; lurking variables can produce the same pattern.
Categories on the x-axis
McDonald recommends a bar graph when the variable on the X axis is nominal (categories with no numeric order), and a scatter or line graph when it is numeric.
Common mistakes
- Putting the outcome on x. If you measured it as the result, it belongs on y.
- Putting time on y. Time goes on x.
- Using a line for category data. A bar graph is the better choice when x is nominal.
- Unlabelled or unitless axes. Name both variables and state units.
- Treating a graph as proof of cause. Placement shows which variable you treat as the predictor, not that it causes the other.
Checklist
- Did I set or choose one variable, or do I suspect it drives the other? That one goes on x.
- Is one variable time? Put time on x.
- Is the x variable nominal? Use a bar graph.
- Does my field have a strong tradition that reverses an axis, as with ocean depth? Follow it and say so.
- Are both axes labelled with variable names and units?
For worked plotting steps with regression lines, see linear regression scatter plot.
FAQ
Does the independent variable go on the x-axis or the y-axis?
The x-axis, the horizontal one. The dependent variable goes on the y-axis, the vertical one.
What if I cannot tell which variable is independent?
Ask which one you think causes or predicts the other, and put that one on x. For observational data this is a judgment, so say in the caption which variable you treated as the predictor.
Where does time go?
On the x-axis, per the Journal of Wrist Surgery guide cited below.
Are there graphs where the independent variable is on the y-axis?
Yes, in some fields. Oceanographers often plot depth below the surface on the y-axis. McDonald advises doing this only when it is a strong tradition in your field.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, Scatter Plot: itl.nist.gov/div898/handbook/eda/section3/eda33q.htm (checked 2026-10-29).
- Slutsky DJ. The Effective Use of Graphs. Journal of Wrist Surgery, 2014: pmc.ncbi.nlm.nih.gov/articles/PMC4078179 (checked 2026-10-29).
- McDonald JH. Guide to Fairly Good Graphs, Handbook of Biological Statistics (Statistics LibreTexts): stats.libretexts.org, section 7.2 (checked 2026-10-29).







