Is there a way to limit the data range of an abline or smooth line in ggplot? For instance exponential distribution data can sometimes have significant lead outliers as well as a long but fairly non-interesting tail:
d = sort(rexp(100, rate = 1), decreasing=T)
ggplot(NULL, aes(1:length(d), d)) + geom_point() + scale_y_log10() + geom_smooth(method = lm, se=F)
The blue line is ggplot's, and the red I've added to show the line I'd like to add by constraining the geom_smooth function to an x-range of say 12-80 - for instance to show the domain in which a hypothesised relationship might exist between variables when accounting for special cases and long tail. Any advice appreciated on how this might be achieved.