如何在上述两种CI图中用线连接方式?对于下面 链接示例。
答案 0 :(得分:0)
在底数R中使用lines
绘制线。它不会重新开始绘图。
library(plotrix)
set.seed(1234) # In the linked to question
# the rsults were not reproducible
x <- 1:10
y1 <- x + rnorm(10)
y2<-x+rnorm(10)
delta <- runif(10)
plotCI(x,y=y1,uiw=delta,xaxt="n",gap=0)
axis(side=1,at=c(1:10),labels=rep("a",10),cex=0.7)
lines(x, y = y1 + delta, lty = "dotted")
lines(x, y = y1 - delta, lty = "dotted")