With a steepening environmental gradient, a stable range margin forms when (red dots). (A) The gradient in trait mean follows the environmental optimum (dashed line) until the gradients steepens so that , where expansion stops. (B) Population density drops off sharply when the predicted threshold (red dots) is reached. Dashed line gives the predicted population size assuming variation is not eroded by genetic drift. (C) Three representative clines are shown in black, and other clines form the gray background. (D) Adaptation fails when genetic variance fails to increase fast enough to match the steepening environmental gradient (total variance in black; linkage equilibrium component in blue). For all subfigures, the dashed lines give deterministic predictions (Fig. 1 and ref. 11). Parameters are as follows: central gradient , , , , , . Time = 100,000 generations; expansion stops after 40,000 generations; A also shows the initial stage in light blue.