The ggplot2
-function stat_smooth()
has the option fullrange=TRUE
or FALSE
which decides if the fit is drawn over the range of the data or the range of the graph.
Is there a way to give the stat_smooth()
a miscellaneous range ? E.g. if my plot has x in (0,100) but the fitted data x in (40,60), to plot the smoothed fit for range x in (30,70).