Measurements of fluctuations and convection patterns in horizontal layers of fluid heated from below and near the onset of Rayleigh–Bénard convection (RBC) are reported under conditions where the fluid properties vary strongly over the temperature range ΔT = Tb − Tt (Tb and Tt are the temperatures at the bottom and top of the sample, respectively). To facilitate a comparison with the data, the theory of Busse (J. Fluid Mech., vol. 30, 1967, p. 625) of these so called non-Oberbeck–Boussinesq (NOB) effects, which applies to the case of relatively weak (and linear) temperature dependences, was extended to arbitrary variations with temperature. It is conceptually useful to divide the variations with temperature of the fluid properties into two disjunct parts. One part is chosen so that it preserves the reflection symmetry of the system about the horizontal midplane, while the remainder breaks that symmetry. The latter, exclusively considered by Busse, leads (in contrast to the formation of the typical convection rolls in RBC) to hexagons immediately above the transition to convection at the critical temperature difference ΔTc. The symmetric part, on the other hand, does not prevent the bifurcation to rolls, but may become very important for the determination of ΔTc. In the experiment the fluid was sulfur hexafluoride at temperatures above but close to the gas–liquid critical point, where all fluid properties vary strongly with temperature. All measurements were done along isobars by varying ΔT. Patterns were observed above onset (ΔT ≳ ΔTc), while for the conduction state at ΔT < ΔTc there were only fluctuations induced by Brownian motion. When the mean temperature Tm = (Tb + Tt)/2 was such that the density ρ at Tm was equal to the critical density ρ*, the mirror symmetry about the horizontal midplane of the sample was essentially preserved. In that case, as expected, we found a direct transition to rolls and the critical temperature difference ΔTc was considerably shifted compared to the critical value ΔTc,OB in the absence of NOB effects. When, on the other hand, Tm was not located on the critical isochore, the NOB effects broke the reflection symmetry and led to a hysteretic transition from fluctuations to hexagonal patterns. In this latter case the hexagonal pattern, the observed hysteresis at onset and the transition from hexagons to rolls at larger ΔT were consistent with the ‘classical’ predictions by Busse.