Add error bars to show standard deviation on a plot in R

前端 未结 5 488
野性不改
野性不改 2020-11-27 03:51

For each X-value I calculated the average Y-value and the standard deviation (sd) of each Y-value

x  = 1:5
y  = c(1.1,         


        
5条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 04:42

    You can use arrows:

    arrows(x,y-sd,x,y+sd, code=3, length=0.02, angle = 90)
    

提交回复
热议问题