We can check that the blue graph is identical to the yellow graph except it is translated one unit upward.
Assuming that the blue graph corresponds to g(x), we have g(x) = f(x) + 1, and, assuming the blue graph corresponds to f(x), we have g(x) = f(x) - 1.