bogplot <- read.csv("bogforplot.csv") xlims=c(0,550) ylims=c(-0.5,20) attach(bogplot) plot(Elevation, Sobs, pch=1, cex=2,col="black", xlim=xlims, ylim=ylims, xlab="Elevation (meters a.s.l.)", ylab="Number of species") segments((Elevation-2), Nlower, (Elevation-2), Nupper, lwd=1.5, col="cornflowerblue") points(Elevation-2, Nmedian, pch=21, cex=1.5, col="cornflowerblue", bg="white") segments((Elevation+2), CI.low, (Elevation+2), CI.high, lwd=1.5, col="blue3") points((Elevation+2), bogplot$Chao2, pch=21, cex=1.5, col="blue3", bg="blue3")