there is nothing special about the "x"-axis. the transformation can apply to the "y"- or "z"-axis, or indeed in any direction, which can be done by directions parallel to the motion (which are warped by the "γ" factor) and perpendicular; see the article lorentz transformation for details.