The main goal of this exploratory study is to determine how the temperature-salinity relationship changes with horizontal length scale and depth in the ocean. Temperature and salinity were measured on a range of scales from 4 m to 1000 km, towing a SeaSoar along isobars and isopycnals in the subtropical gyre of the North Pacific, during the winter of 1997. The wavelet transform technique is used to compute the horizontal density ratio and thermohaline variability as a function of scale and location. Measurements along an isobar in the mixed layer show that the horizontal density ratio is 1 at all scales observed; that is, horizontal temperature and salinity gradients tend to cancel each other in their effect on density. Thermohaline variability at small scales is intermittent and clusters around large-scale thermohaline anomalies. Below the base of the mixed layer, horizontal gradients of temperature are only partially opposed by salinity, and the density ratio is close to 2. In the thermocline the distribution of thermohaline variability is uniform along isobars but intermittent and colocated at different scales along isopycnals. Density-compensated variability, ubiquitous in the mixed layer, is reduced along deeper isopycnals. Compensation of horizontal temperature and salinity gradients supports recent theoretical ideas that mixing in the winter mixed layer depends on horizontal density gradients.