Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 R 中绘制一个ecdf对象会产生一个很好的经验分布函数。例如:
ecdf
x = seq(1,10,1) ecdf1 = ecdf(x) plot(ecdf1,verticals=TRUE, do.points=FALSE)
但是,默认行为会生成一个在 0 和 1 处带有水平虚线的图形。我没有看到plot.ecdf()在对plot.stepfun(). 现在,我实际上是在虚线上方画一条白线。
plot.ecdf()
plot.stepfun()
当然有办法关闭绘制这些虚线?
尝试:
plot(ecdf1,verticals=T, do.points=F,col.01line = NULL)
推理:我用过getAnywhere("plot.ecdf"),找到了abline(h = c(0, 1), col = col.01line, lty = 2)。这就是原因。由于它col.01line用作颜色的输入,我们只需将颜色设置为NULL.
getAnywhere("plot.ecdf")
abline(h = c(0, 1), col = col.01line, lty = 2)
col.01line
NULL