When graphing data, you do need to pay attention to which variable goes on which axis. One of the variables will be the independent variable and the other is the dependent variable.
The independent variable is typically the one that you are changing and observing the effect on the other variable which is the dependent variable. The independent variable is on the x-axis and the dependent variable is on the y-axis.
For example, if we do an experiment that is monitoring the pressure as a function of volume. Since you are controlling the volume, it would be the independent variable and be graphed on the x-axis. You aren't controlling the pressure so it would be the dependent variable and be graphed on the y-axis.