Ecologically important traits do not evolve without limits. Instead, evolution is constrained by the set of available and viable phenotypes. In particular, natural selection may only favour a narrow range of adaptive optima constrained within selective regimes. Here, I integrate data with theory to test whether selection explains phenotypic constraint. A global database of 599 plant species from 94 families shows that stomatal ratio, a trait affecting photosynthesis and defence against pathogens, is highly constrained. Most plants have their stomata on the lower leaf surface (hypostomy), but species with half their stomata on each surface (amphistomy) form a distinct mode in the trait distribution. A model based on a trade-off between maximizing photosynthesis and a fitness cost of upper stomata predicts a limited number of adaptive solutions, leading to a multimodal trait distribution. Phylogenetic comparisons show that amphistomy is the most common among fast-growing species, supporting the view that CO$_2$ diffusion is under strong selection. These results indicate that selective optima stay within a relatively stable set of selective regimes over macroevolutionary time.