我使用{plotrix}包中的plotCI函数。请看下图:
如您所见,误差线有两条水平线(一条顶部和一条底部)。有谁知道如何摆脱这些线?
以下是我从here借来的可重现代码:
require(plotrix)
y<-runif(10)
err<-runif(10)
plotCI(1:10,y,err,2*err,lwd=2,col="red",scol="blue",
main="Add colors to the points and error bars")
lines(1:10, y)
答案 0 :(得分:4)
函数plotCI()
具有参数sfrac=
,用于确定这些行的长度。将此参数设置为0将删除行。
plotCI(1:10,y,err,2*err,lwd=2,col="red",scol="blue",
main="Add colors to the points and error bars",sfrac=0)