fiona_93 发表于 2016-6-3 14:29 
请问后来是怎么解决了的呢?谢谢
scatterplot(x, y, 
         
smoother=loessLine, smoother.args=list(), smooth, span,
         spread=!by.groups, reg.line=lm,
         boxplots=if (by.groups) "" else "xy",
         xlab=deparse(substitute(x)), ylab=deparse(substitute(y)), las=par("las"),
         lwd=1, lty=1,
         labels, id.method = "mahal", 
         id.n = if(id.method[1]=="identify") length(x) else 0, 
         id.cex = 1, id.col = palette()[1],
         log="", jitter=list(), xlim=NULL, ylim=NULL,
         cex=par("cex"), cex.axis=par("cex.axis"), cex.lab=par("cex.lab"), 
         cex.main=par("cex.main"), cex.sub=par("cex.sub"), 
         groups, by.groups=!missing(groups), 
         legend.title=deparse(substitute(groups)), legend.coords, legend.columns,
         ellipse=FALSE, levels=c(.5, .95), robust=TRUE,
         col=if (n.groups == 1) palette()[3:1] else rep(palette(), length=n.groups),
         pch=1:n.groups, 
         legend.plot=!missing(groups), reset.par=TRUE, grid=TRUE, ...)
请注意scatterplot()函数的红色字体部分!!!
smoother=loessLine表示光滑曲线由loessLine()函数(该函数具体信息参见“?ScatterplotSmoothers”命令下的帮助文档)绘制
而smoother.args=list()则规定了光滑曲线的其它参数,
而loessLine()函数的默认参数为:
smoother.args=list(lty=1,lwd=2, lty.spread=2, lwd.spread=1, span=0.5, degree=2,
                           family="symmetric", iterations=4)
#lty.spread和lwd.spread指定了spread=TRUE时添加线条的类型和宽度。
所以lty.smooth=2的命令可由smoother.args=list(lty=2)来实现。
即
> scatterplot(yeild~N,data=ndata,lty.smooth=2,spread=FALSE,pch=19)
可修改为
> scatterplot(yeild~N,data=ndata,smoother.args=list(lty=2),spread=FALSE,pch=19)
其它的像scatterplotMatrix()函数亦是如此。