[R] scatterplots in car package

Hrishi Mittal hrishimittal at gmail.com
Tue Feb 23 13:05:15 CET 2010


Robert,

It seems that the scatterplot() command is starting a new graphics device.
You could use the base plot command to achieve the same results including
the non-parametric fit (scatterplot() uses a lowess fit):

#First it's important to save the distributions as objects, otherwise
rnorm() will produce a different set of values when you run the curve
fitting commands later.
x<-rnorm(100)
y<-rnorm(100)
plot(x,y,cex=0.7,col="red",xlab="rnorm(100)",ylab="rnorm(100)")
lines(lowess(y~x),col="red")
abline(lm(y~x),lty=2,col="red")


-----
Try  http://prettygraph.com Pretty Graph , the easiest way to make R-powered
graphs on the web.
-- 
View this message in context: http://n4.nabble.com/scatterplots-in-car-package-tp1565791p1565812.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list