Suppose that I'm working on Hadley's diamond dataset and I want to review the relationship between price, colour and carat.
I might run the following: library(ggplot2) #plot scatter and add some hex binning q<-qplot(carat,price,data=diamonds, geom=c("hex"), main="Variability of Diamond Prices by Carat and Colour") #facet to get one scatter for each colour, plus overlay a black coloured loess smoothed line showing the trends in the data q + facet_wrap(~color,ncol=2)+geom_smooth(aes(group=1),colour=I("black")) Nice picture, but how do I extract the values of the smoothed line? Many thanks, dM/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.