which is the X axis and which is the y axis. Is there a way to remember it?

x is usually horizontal (by convention) and y is usually vertical, but it does not have to be that way. When you label the + side of the axes, the x is lower than the y.