[R] Plotting multiple smooth lines on the same graph

Eleni Rapsomaniki e.rapsomaniki at mail.cryst.bbk.ac.uk
Fri Dec 15 14:42:25 CET 2006


Hi

Say we have the following data sets:
d1=cbind(rnorm(100,1,1), rnorm(100,10,50))
d2=cbind(rnorm(100,5,1), rnorm(100,1,5))

I want to plot them both on the same graph with a curve fitted for each. 
I could call scatter.smooth to plot the first curve, but how do I add the
second?

scatter.smooth(d1)

Many thanks
Eleni Rapsomaniki



More information about the R-help mailing list