To expand on Gabor's response, using type=c("p","smooth") will closer replicate the effect of the scatter.smooth function.
-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Gabor Grothendieck > Sent: Saturday, January 30, 2010 4:18 PM > To: ATANU > Cc: r-help@r-project.org > Subject: Re: [R] DRAW TWO REGRESSION CURVES IN ONE GRAPH > > On Sat, Jan 30, 2010 at 12:39 PM, ATANU <ata.s...@gmail.com> wrote: > > how can i draw two regression curves in one graph??i can draw them > seperately > > using scatter.smooth.but can"t adjust them in one single graph > > Using the built in iris data frame: > > library(lattice) > xyplot(Sepal.Length ~ Sepal.Width, iris, group = iris$Species, col = > 1:3, type = c("p", "r")) > > ______________________________________________ > 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. ______________________________________________ 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.