楼主: Nelsh--Deng
7040 11

[问答] 图形参数 [推广有奖]

  • 13关注
  • 7粉丝

学科带头人

45%

还不是VIP/贵宾

-

威望
0
论坛币
9376 个
通用积分
4.2428
学术水平
13 点
热心指数
14 点
信用等级
11 点
经验
49840 点
帖子
1009
精华
0
在线时间
2785 小时
注册时间
2012-12-21
最后登录
2025-9-23

楼主
Nelsh--Deng 发表于 2015-2-17 13:45:43 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
在scatterplot函数中,lty.smooth到底是不是一个函数的参数,为什么运行时R总是报错?请各位指点,谢谢~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:scatterplot Scatter smooth SCAT plot

沙发
DM小菜鸟 发表于 2015-3-2 15:32:12
这个函数全套的应该是——
panel.Stratiplot(x, y,
                 type = "l",
                 col,
                 pch = plot.symbol$pch,
                 cex = plot.symbol$cex,
                 col.line = plot.line$col,
                 col.symbol = plot.symbol$col,
                 col.refline = ref.line$col,
                 col.smooth = "red",
                 col.poly = plot.line$col,
                 lty = plot.line$lty,
                 lwd = plot.line$lwd,
                 lty.smooth = plot.line$lty,
                 lwd.smooth = 2,
                 fill = plot.symbol$fill,
                 zones = NULL,
                 col.zones = plot.line$col,
                 lty.zones = plot.line$lty,
                 lwd.zones = plot.line$lwd,
                 gridh = -1, gridv = -1,
                 ...)  


lty.smooth:line type for the loess smoother.The default is obtained from plot.line using trellis.par.get.

不过具体的还要看你报的什么错

藤椅
Nelsh--Deng 发表于 2015-3-3 10:48:14
DM小菜鸟 发表于 2015-3-2 15:32
这个函数全套的应该是——
panel.Stratiplot(x, y,
                 type = "l",
恩,我等下试试,再交流,谢谢

板凳
似海 学生认证  发表于 2015-12-2 19:13:27
> scatterplot(yeild~N,data=ndata,lty.smooth=2,spread=FALSE,pch=19)
Warning messages:
1: In plot.window(...) : "lty.smooth" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "lty.smooth" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
  "lty.smooth" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
  "lty.smooth" is not a graphical parameter
5: In box(...) : "lty.smooth" is not a graphical parameter
6: In title(...) : "lty.smooth" is not a graphical parameter
请教这是什么原因

报纸
fiona_93 发表于 2016-6-3 14:29:36
似海 发表于 2015-12-2 19:13
> scatterplot(yeild~N,data=ndata,lty.smooth=2,spread=FALSE,pch=19)
Warning messages:
1: In plot.wi ...
请问后来是怎么解决了的呢?谢谢

地板
百年-树人 发表于 2016-7-17 11:00:17
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()函数亦是如此。
已有 4 人评分学术水平 热心指数 信用等级 收起 理由
yangjia1980cq + 1 分析的有道理
十五弟 + 1 + 1 精彩帖子
李素涛 + 1 + 1 + 1 精彩帖子
henrylx13 + 1 + 1 精彩帖子

总评分: 学术水平 + 4  热心指数 + 3  信用等级 + 1   查看全部评分

决定了就不要后悔,走下去~~~

7
fiona_93 发表于 2017-6-6 16:18:06
谢谢!!!后来换了方法,一直没来看这个贴了。很感谢你的回复!

8
fiona_93 发表于 2017-6-6 16:18:13
谢谢!!!后来换了方法,一直没来看这个贴了。很感谢你的回复!

9
xiaotahlo 学生认证  发表于 2018-1-7 09:49:30
谢谢,受益了

10
lion果 发表于 2019-1-21 22:31:23
spread和smoother.args 显示不是图形参数,求教各位大神

BA78FFB2-85C6-406A-B1EB-5766F40AA762.jpeg (6.89 MB)

BA78FFB2-85C6-406A-B1EB-5766F40AA762.jpeg

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 12:33