[R] scatter.smooth() line colour
David L Carlson
dcarlson at tamu.edu
Fri Jun 22 16:30:00 CEST 2012
You are correct about scatter.smooth, but loess.smooth
(listed along with scatter.smooth on the same
help page) gives you the way to get what you want:
x <- rnorm(25)
y <- rnorm(25)
plot(x, y)
lines(loess.smooth(x,y), col="red", lty=2, lwd=2)
----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of r-help.20.trevva at spamgourmet.com
> Sent: Friday, June 22, 2012 6:04 AM
> To: r-help at r-project.org
> Subject: [R] scatter.smooth() line colour
>
> Hi,
>
> I really like the scatter.smooth() function - its extremeley useful.
> However, as far as I understand it, there is no way to change the
> properties of the smoothing line e.g. col, lty, lwd. The
> scatter.smooth function accepts a ... argument, but these are not
> passed to the plotting function that actually plots the smoother -
> only to the function that plots the points. Could I please therefore
> request that an argument be added to this function to give easier
> control over line properties? e.g. line.par=list()
>
> Best wishes,
>
> Mark Payne
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list