Plants are notoriously variable in gender, ranging in sex allocation from purely male through hermaphrodite to purely female. This variation can have both a genetic and an adaptive plastic component. In gynodioecious species, where females co-occur with hermaphrodites, hermaphrodites tend to shift their allocation towards greater maleness when growing under lowresource conditions, either as a result of hermaphrodites shifting away from an expensive female function, or because of enhanced siring advantages in the presence of females. Similarly, in the androdioecious plant Mercurialis annua, where hermaphrodites co-exist with males, hermaphrodites also tend to enhance their relative male allocation under low-resource conditions. Here, we ask whether this response differs between hermaphrodites that have been evolving in the presence of males, in a situation analogous to that supposed for gynodioecious populations, vs. those that have been evolving in their absence. We grew hermaphrodites of M. annua from populations in which males were either present or absent under different levels of nutrient availability and compared their reaction norms. We found that, overall, hermaphrodites from populations with males tended to be more female than those from populations lacking males. Importantly, hermaphrodites' investment in pollen and seed production was more plastic when they came from populations with males than without them, reducing their pollen production at low resource availability and increasing their seed production at high resource availability. These results are consistent with the hypothesis that plasticity in sex allocation is enhanced in hermaphrodites that have likely been exposed to variation in mating opportunities due to fluctuations in the frequency of co-occurring males.