After the point P(x, y) is translated according to the vector (a, b), the corresponding P' coordinate is (x+a, y+b), so there are x = x'-a and y = y'-b.
Substitute x=x'-a and y=y'-b into y=f(x) to get y'-b=f(x'-a).
Because you draw in the xOy coordinate system, the horizontal and vertical variables of the coordinate system are X and Y, so you must write X' as X and Y' as Y, otherwise you can't draw it.
You have y = f (x-a)+b.
So you can see that if a>0 is shifted to the right by one unit, f(x) becomes f(x-a).
If a
So there is left plus right minus.