f is line through origin and slope 1 so it is slanted exactly between vertical and horizontal.
g pushed the line downward by 2 units and pulled the line horizontally (or squashed the line vertically) so it is smaller slope but still increases from left to right.