The effect of surface gravity on line-depth ratios in the wavelength range 0.97–1.32 µm