Adaptation to a heterogeneous environment in an annual plant species with a mixed mating system