Horizontal and vertical lines can be drawn with only one coordinate, so the horizontal lines need the X coordinate and vertical lines need the Y coordinate.