Table of Contents
The variable that represents the independent or explanatory factor should be placed on the X-axis, while the variable that represents the dependent or response factor should be placed on the Y-axis. This allows for a clear and understandable visual representation of the relationship between the two variables. Additionally, it follows the standard convention of graphing where the X-axis is typically used for the independent variable and the Y-axis for the dependent variable.
Choose Which Variable to Place on X-Axis and Y-Axis
When creating a line plot or a scatterplot, students often have the following question:
Which variable should I place on the x-axis and which should I place on the y-axis?
The short answer: The independent variable (or “explanatory variable”) should go on the x-axis and the dependent variable (or “response variable”) should go on the y-axis.

Another way to phrase it: the variable that can be viewed as “explanatory” should go on the x-axis and the variable that is “being explained” should go on the y-axis.
The following examples show how to choose which variable to place on each axis in practice.
Example 1: Hours Studied vs. Exam Score
Suppose a professor collects data on the following variables for students in his class:
- Number of hours studied
- Exam score received
When creating a scatterplot to visualize these two variables, he should place the following variables on each axis:
- x-axis: Number of hours studied
- y-axis: Exam Score received
Since the exam score received is dependent on the number of hours studied, the number of hours studied belongs on the x-axis while the exam score belongs on the y-axis.
Here’s what the scatterplot would look like:

Example 2: Food Consumption vs. Weight
Suppose a biologist collects data on the following variables for mice in his lab:
- Grams of food fed daily
- Weight after one month
- x-axis: Grams of food fed daily
- y-axis: Weight after one month
Since the weight of each mouse is dependent on the number of grams of food they’re fed daily, the number of grams of food belongs on the x-axis while the weight belongs on the y-axis.
Here’s what the scatterplot would look like:

Example 3: Age vs. Height
Suppose a botanist collects data on the following variables for a certain plant:
- Height (in inches)
- Age (in weeks)
When creating a line plot to visualize these two variables, she should place the following variables on each axis:
- x-axis: Age (in weeks)
- y-axis: Height (in inches)
Since the height of the plant is dependent on the age, the age belongs on the x-axis while the height belongs on the y-axis.
Here’s what the line plot would look like:

The following tutorials explain the difference between different types of variables:
Cite this article
stats writer (2024). Which variable should be placed on the X-axis and which on the Y-axis?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/which-variable-should-be-placed-on-the-x-axis-and-which-on-the-y-axis/
stats writer. "Which variable should be placed on the X-axis and which on the Y-axis?." PSYCHOLOGICAL SCALES, 6 May. 2024, https://scales.arabpsychology.com/stats/which-variable-should-be-placed-on-the-x-axis-and-which-on-the-y-axis/.
stats writer. "Which variable should be placed on the X-axis and which on the Y-axis?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/which-variable-should-be-placed-on-the-x-axis-and-which-on-the-y-axis/.
stats writer (2024) 'Which variable should be placed on the X-axis and which on the Y-axis?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/which-variable-should-be-placed-on-the-x-axis-and-which-on-the-y-axis/.
[1] stats writer, "Which variable should be placed on the X-axis and which on the Y-axis?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, May, 2024.
stats writer. Which variable should be placed on the X-axis and which on the Y-axis?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
