The species–area curve is generated by niche-related factors and stochastic factors like neutral processes or dispersal. Even though the use of environmental variables is widespread to predict the spatial distribution of species richness, it remains difficult to distinguish the relative importance of habitat heterogeneity and the area effect on total species richness. In our study, we used different types of species–area curves to disentangle the habitat heterogeneity effect and the area effect on vascular plant species richness. We generated three types of sample rarefaction curves: (1) a randomly aggregated rarefaction curve, (2) a rarefaction curve for which areas of similar habitat types were aggregated and (3) a rarefaction curve, for which areas of dissimilar habitat types were aggregated. These analyses were made on three data sets separately with different grain sizes to investigate if this had an effect on the observed pattern. The classification of the habitat types was based on three environmental variables (mean annual temperature, mean moisture index and the slope of the terrain). A consistent pattern of sample rarefaction curves was found with all three data sets. While the aggregation of dissimilar habitat types showed the highest species accumulation rates and saturation levels, the lowest accumulation rates and saturation levels were found when similar habitat types were aggregated. Depending on the grain size, the habitat heterogeneity effect accounted for 20–30% to the total species richness. However, this effect was not statistically significant. The results indicate, that effects of niche related factors on the species–area curve are scale dependent and that effects related to the area are at least as important in explaining the species richness.