[R] scatter.smooth() line colour

Mark Payne trevva at gmail.com
Fri Jun 22 16:51:47 CEST 2012


Hi David,

Thanks for the reply. I agree - it just seemed that it was something
fairly obvious that was missing from an otherwise handy little
function.... Would it be appropriate to file it as a "request for
improvement" in the bug tracking system?

Mark

On 22 June 2012 16:30, David L Carlson - dcarlson at tamu.edu
<+r-help+trevva+3b274928d0.dcarlson#tamu.edu at spamgourmet.com> wrote:
> 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