The shapes of clines and wavefronts