> -----Original Message----- > From: Dowkiw, Arnaud [mailto:[EMAIL PROTECTED] > Sent: Thursday, 26 June 2003 3:52 PM > To: R help mailing list (E-mail) > Subject: [R] Change default parameters of panel.smooth > > > Hello, > > can anyome tell me how to access the full script of the > panel.smooth function so that I can change the thickness of > the smoothing line or its colour ? > All I could access is : > > > panel.smooth > function (x, y, col = par("col"), bg = NA, pch = par("pch"), > cex = 1, col.smooth = "red", span = 2/3, iter = 3, ...) > { > points(x, y, pch = pch, col = col, bg = bg, cex = cex) > ok <- is.finite(x) & is.finite(y) > if (any(ok)) > lines(lowess(x[ok], y[ok], f = span, iter = iter), > col = col.smooth, > ...) > } > <environment: namespace:base>
I think that is all you need. Colour can be changed by setting col.smooth, and the line thickness is actually controlled by lines(), but if you pass panel.smooth lwd=3 (say), it is passed along to lines() with the rest of the arguments. Try: > x <- rnorm(10) > y <- rnorm(10) > plot(x,y) > panel.smooth(x,y,col.smooth="blue", lwd=3) > HTH, Simon. Simon Blomberg, PhD Depression & Anxiety Consumer Research Unit Centre for Mental Health Research Australian National University http://www.anu.edu.au/cmhr/ [EMAIL PROTECTED] +61 (2) 6125 3379 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
