Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
sm.density.compare的粗线_R - Fatal编程技术网

sm.density.compare的粗线

sm.density.compare的粗线,r,R,我使用的是这样的东西: library(sm) sm.density.compare(X, Class) 有没有办法增加密度绘图线的厚度?我以前从未见过这个特定的包,但是如果您研究sm::sm.density.compare函数是如何构造的,它会从sm::.sm.Options接收其图形参数,其中线宽lwd设置为1 因此,您只需将lwd选项传递给函数,就像您通常对基本图所做的那样。见下文: y <- rnorm(100) g <- rep(1:2, rep(50,2)) sm.d

我使用的是这样的东西:

library(sm)

sm.density.compare(X, Class)

有没有办法增加密度绘图线的厚度?

我以前从未见过这个特定的包,但是如果您研究
sm::sm.density.compare
函数是如何构造的,它会从
sm::.sm.Options
接收其图形参数,其中线宽
lwd
设置为1

因此,您只需将
lwd
选项传递给函数,就像您通常对基本图所做的那样。见下文:

y <- rnorm(100)
g <- rep(1:2, rep(50,2))
sm.density.compare(y, g, model="equal")
sm.density.compare(y, g, model="equal", lwd = 3)

y您是如何发现lwd作为一种选项的?我看不到在中引用它: