#------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------# #---------------------------- veldhuis et al. ---------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------------------------------------------------------# rm(list=ls()) ## set work directory dir <- "C:/Users/veldhuismp/surfdrive/Papers/Submitted/Timescapes of heat and fear/NEE/Data preparation script" setwd(dir) #################### Getting data ######################## ## load data file act.level <- read.csv("act.level.csv", sep=";", dec=".") species <- read.csv2("species.csv", dec=".") cam.data <- read.csv("cam.data.csv", sep=";", dec=",") # fix date and time cam.data$DateTimeOriginal <- as.POSIXct(strptime(cam.data$DateTimeOriginal, "%Y:%m:%d %H:%M:%S")) cam.data$Date <- as.factor(strptime(cam.data$DateTimeOriginal, "%Y-%m-%d")) cam.data$Sp.session <- paste(cam.data$Species,cam.data$Session,sep="-") ##### Timescapes of fear and heat ################ act.carnivores <- readRDS("act.carnivores.alltemp.RData") all.carnivores <- as.data.frame(act.carnivores@pdf) summary(all.carnivores) all.carnivores$x <- all.carnivores$x / 6.283*24 all.carnivores$y <- all.carnivores$y / 4 all.carnivores$lcl <- all.carnivores$lcl / 4 all.carnivores$ucl <- all.carnivores$ucl / 4 tsheat <- cam.data[,c(7,17)] tsheat$Hour.f <- as.factor(tsheat$Hour) tsheat.agg <- as.data.frame(tapply(tsheat[,1], INDEX=tsheat$Hour.f, FUN="mean")) tsheat.agg <- cbind(tsheat.agg, tapply(tsheat[,2], INDEX=tsheat$Hour.f, FUN="mean")) tsheat.agg <- cbind(tsheat.agg, tapply(tsheat[,2], INDEX=tsheat$Hour.f, FUN="min")) tsheat.agg <- cbind(tsheat.agg, tapply(tsheat[,2], INDEX=tsheat$Hour.f, FUN="max")) names(tsheat.agg) <- c("hour", "mean_heat", "min_heat", "max_heat") tsheat.agg <- rbind(tsheat.agg, c("24", tsheat.agg[1,2], tsheat.agg[1,3], tsheat.agg[1,4])) tsheat.agg[,1] <- as.numeric(tsheat.agg[,1]) tsheat.agg[,2] <- as.numeric(tsheat.agg[,2]) tsheat.agg[,3] <- as.numeric(tsheat.agg[,3]) tsheat.agg[,4] <- as.numeric(tsheat.agg[,4]) tsheat.agg[,2:4] <- tsheat.agg[,2:4] * (max(all.carnivores$ucl)-min(all.carnivores$lcl)) + min(all.carnivores$lcl) ########## Fig. 1A ############# par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,3), oma = c(2, 2, 0.7, 0.2)) plot(all.carnivores$x,all.carnivores$y, bty="l", type="n",xlab="Hours", ylab="Density",labels=FALSE, axes=F, ylim=c(0, 0.075), col="white") x <- all.carnivores$x y1.low <- all.carnivores$lcl y1.high <- all.carnivores$ucl polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0.4,0.4,0.4,0.8), border = NA) lines(all.carnivores$y ~ x,col="black",lty=1, lwd=2) box(bty = 'u', lwd = 2, col="grey70") box(bty = 'l', lwd = 2) axis(1, at=seq(0, 24, by=4), labels=seq(0, 24,4), cex.axis=1.5) axis(2, at=seq(0.0, 0.075, by=0.025), labels=seq(0.0, 0.075, by=0.025), cex.axis=1.5) text(x=0.4, y=0.075,cex=1.4,"A") par(new=T) lines(tsheat.agg$hour, tsheat.agg$mean_heat,type="l", lty=2, lwd=2, col="grey30", ylim=c(-0.1,1.1),labels=FALSE, axes=F, bty="l") x <- tsheat.agg$hour y1.low <-tsheat.agg$min y1.high <- tsheat.agg$max polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0.4,0.4,0.4,0.3), border = NA) axis(4, at=seq(min(all.carnivores$lcl), max(all.carnivores$ucl), by=(max(all.carnivores$ucl)- min(all.carnivores$lcl))/4), labels=seq(0.0, 1.0, by=0.25), cex.axis=1.5, col="grey60", col.axis="grey70") ##### Relative temperature during activity ################ # get observation of relative temperature during activity herb <- droplevels(subset(species,species$Trophic.level=="Herbivore")) '%ni%' <- Negate('%in%') herb.sel <- droplevels(subset(cam.data,cam.data$Species %ni% c("Wild_Dog","Cheetah_African","Leopard_African", "Lion_African", "Hyaena_Spotted"))) herb.list <- split(herb.sel,herb.sel$Sp.session,drop=T) heat <- as.data.frame(tapply(herb.sel$Timeheat, list(herb.sel$Sp.session), FUN=mean)) names(heat) <- "timeheat" heat$sp.session <- rownames(heat) rownames(heat) <- c() ## get other info heat.sel <- act.level[,c(1,6:ncol(act.level))] heat.sel$logbm <- log10(heat.sel$bodymass) ## combine data heat.sel$timeheat <- heat[match(heat.sel$session,heat$sp.session),"timeheat"] #### test of activity library(glmmTMB) heat.s <- heat.sel heat.s[10] <- scale(heat.s[10]) ##### Extended Data Table 3 ####### m1 <- glmmTMB(timeheat ~ logbm + I(logbm^2) + (1|site), data=heat.s, family=beta_family) summary(m1) qqnorm(residuals(m1)) ## model with interaction has lowest AIC value # make predictions for model 2 s <- list() s[[1]] <- seq(min(heat.s$logbm),max(heat.s$logbm),by=0.1) s[[2]] <- unique(heat.s$site) grd <- expand.grid(a=1:length(s[[1]]),b=1:length(s[[2]])) mat <- NULL for(i in 1:nrow(grd)){ cur <- grd[i,] tmp <- cbind(s[[1]][cur[,1]],s[[2]][cur[,2]]) mat <- rbind(mat,tmp) } mat <- as.data.frame(mat) names(mat) <- c("logbm","site") # get right site names heat.s$site2 <- as.numeric(heat.s$site) mat$site2 <- heat.s[match(mat$site,heat.s$site2),"site"] colnames(mat) <- c("logbm","site2","site") ## get predictions lion and 95% CI based on se of predictions (Wald-type) predat <- stats::predict(m1,newdata=mat,type="link",se.fit=T) mat$predict <- plogis(predat$fit) #mat$predict <- predict(m2.1,newdata=mat,type="response") mat$lwr <- plogis(predat$fit-1.96*predat$se.fit) mat$upr <- plogis(predat$fit+1.96*predat$se.fit) ## average over sites heat.s.predict <- aggregate(predict ~ logbm, data=mat, FUN=mean) heat.s.predict.lwr <- aggregate(lwr ~ logbm, data=mat, FUN=mean) heat.s.predict.upr <- aggregate(upr ~ logbm, data=mat, FUN=mean) heat.s.predict$predict.lwr <- heat.s.predict.lwr$lwr heat.s.predict$predict.upr <- heat.s.predict.upr$upr heat.s.predict$logbm.t <- I(heat.s.predict$logbm*sd(heat.sel$logbm)+mean(heat.sel$logbm)) ###### Plot predictions # ranges are some for all three plots xrange <- range(heat.s.predict$logbm.t) yrange <- range(heat.s.predict$predict.upr,heat.s.predict$predict.lwr) ##### Fig. 1B ######## par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,2), oma = c(2, 2, 0.2, 0.2)) # plot for min temperature plot(xrange, yrange, ylim=c(0.1,0.7),bty="l", type="n",xlab="Log 10 Body mass (kg)", ylab="Selection for activity during cool times",labels=FALSE, axes=F) x <- heat.s.predict[,5] y1.low <- heat.s.predict[,3] y1.high <- heat.s.predict[,4] lines(predict ~ logbm.t, data=heat.s.predict,col="black",lty=1, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0.4,0.4,0.4,0.4), border = NA) box(bty = 'l', lwd = 2) axis(1, at=seq(1,3, by=1), labels=c(10, 100,1000), cex.axis=1) axis(2, at=seq(0.1, 0.7, by=0.1), labels=seq(0.1, 0.7, by=0.1), cex.axis=1) text(x=0.5, y=0.7, cex=1.4,"B") ################## Overlap with carnivore activity ###################### overlap.carnivores <- read.csv("overlap.with.carnivores.csv") overlap.carnivores$logbm <- log10(overlap.carnivores$bodymass) overlap.carnivores$site <- heat.s$site ########### Extended Table 3 ################### library(glmmTMB) m1 <- glmmTMB(overlap ~ logbm + I(logbm^2) + (1|site), data=overlap.carnivores, family=beta_family) summary(m1) # make predictions for model 1 s <- list() s[[1]] <- seq(min(overlap.carnivores$logbm),max(overlap.carnivores$logbm),by=0.1) s[[2]] <- unique(overlap.carnivores$site) grd <- expand.grid(a=1:length(s[[1]]),b=1:length(s[[2]])) mat <- NULL for(i in 1:nrow(grd)){ cur <- grd[i,] tmp <- cbind(s[[1]][cur[,1]],s[[2]][cur[,2]]) mat <- rbind(mat,tmp) } mat <- as.data.frame(mat) names(mat) <- c("logbm","site") # get right site names overlap.carnivores$site2 <- as.numeric(overlap.carnivores$site) mat$site2 <- overlap.carnivores[match(mat$site,overlap.carnivores$site2),"site"] colnames(mat) <- c("logbm","site2","site") ## get predictions carnivores and 95% CI based on se of predictions (Wald-type) predat <- stats::predict(m1,newdata=mat,type="link",se.fit=T,allow.new.levels=T) mat$predict <- plogis(predat$fit) mat$lwr <- plogis(predat$fit-1.96*predat$se.fit) mat$upr <- plogis(predat$fit+1.96*predat$se.fit) ## average over sites overlap.predict <- aggregate(predict ~ logbm, data=mat, FUN=mean) overlap.predict.lwr <- aggregate(lwr ~ logbm, data=mat, FUN=mean) overlap.predict.upr <- aggregate(upr ~ logbm, data=mat, FUN=mean) overlap.predict$predict.lwr <- overlap.predict.lwr$lwr overlap.predict$predict.upr <- overlap.predict.upr$upr ## back transform temperature and bodymass overlap.predict$logbm.t <- I(overlap.predict$logbm*sd(overlap.carnivores$logbm)+mean(overlap.carnivores$logbm)) ###### Plot predictions # ranges are some for all three plots xrange <- range(overlap.predict$logbm) yrange <- range(0,1) ########### Fig. 1C ################### par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,3), oma = c(2, 2, 0.2, 0.2)) plot(xrange, yrange, bty="l", type="n",xlab="Body mass (kg)", ylab="Predicted proportion of overlap with carnivores",labels=FALSE, axes=F, ylim=c(0.4, 0.9)) x <- overlap.predict[,1] y1.low <- overlap.predict[,3] y1.high <- overlap.predict[,4] lines(predict ~ logbm, data=overlap.predict,col="black",lty=1, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0.4,0.4,0.4,0.4), border = NA) box(bty = 'l', lwd = 2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1.5) axis(2, at=seq(0.4, 0.9, by=0.1), labels=seq(0.4, 0.9, by=0.1), cex.axis=1.5) text(x=0.4, y=0.9,cex=1.4,"C") ####### Activity level ###################### ## scale independent variables act.level$logbm <- log10(act.level.s$bodymass) act.level.s <- act.level act.level.s$logbm <- log10(act.level.s$bodymass) act.level.s[14] <- scale(act.level.s[14]) ########## Extended Data Table 3 ################ m1 <- glmmTMB(act ~ logbm + I(logbm^2) + (1|site), data=act.level.s, family=beta_family) summary(m1) qqnorm(resid(m1));qqline(resid(m1)) # make predictions s <- list() s[[1]] <- seq(min(act.level.s$logbm),max(act.level.s$logbm),by=0.1) s[[2]] <- unique(act.level.s$site) grd <- expand.grid(a=1:length(s[[1]]),b=1:length(s[[2]])) mat <- NULL for(i in 1:nrow(grd)){ cur <- grd[i,] tmp <- cbind(s[[1]][cur[,1]],s[[2]][cur[,2]]) mat <- rbind(mat,tmp) } mat <- as.data.frame(mat) names(mat) <- c("logbm","site") # get right site names act.level.s$site2 <- as.numeric(act.level.s$site) mat$site2 <- act.level.s[match(mat$site,act.level.s$site2),"site"] colnames(mat) <- c("logbm","site2","site") ## get predictions and 95% CI based on se of predictions (Wald-type) predat <- stats::predict(m1,newdata=mat,type="link",se.fit=T) mat$predict <- plogis(predat$fit) mat$lwr <- plogis(predat$fit-1.96*predat$se.fit) mat$upr <- plogis(predat$fit+1.96*predat$se.fit) ## average over sites act.lvl.predict <- aggregate(predict ~ logbm , data=mat, FUN=mean) act.lvl.predict.lwr <- aggregate(lwr ~ logbm , data=mat, FUN=mean) act.lvl.predict.upr <- aggregate(upr ~ logbm , data=mat, FUN=mean) act.lvl.predict$predict.lwr <- act.lvl.predict.lwr$lwr act.lvl.predict$predict.upr <- act.lvl.predict.upr$upr ## back transform bodymass act.lvl.predict$logbm.t <- I(act.lvl.predict$logbm*sd(act.level$logbm)+mean(act.level$logbm)) ###### Plot predictions # ranges are some for all three plots xrange <- range(act.lvl.predict$logbm.t) yrange <- range(act.lvl.predict$predict.upr,act.lvl.predict$predict.lwr) ######## Fig. 1D ############### par(mar=c(2, 2, 0.2, 0.2), mfrow=c(1,1), oma = c(2, 2, 0.2, 0.2)) # plot for min temp plot(xrange, yrange, ylim=c(0.3,0.7),bty="l", type="n",xlab="Body mass (kg)", ylab="Activity level",labels=F, axes = F) x <- act.lvl.predict[1:40,5] y1.low <- act.lvl.predict[1:40,3] y1.high <- act.lvl.predict[1:40,4] polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col="grey70", border = NA) lines(predict ~ logbm.t, data=act.lvl.predict,col="black",lty=1, lwd=2) box(bty = 'l', lwd = 2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1.5) axis(2, at=seq(0.3,0.7, by=0.1), labels=seq(0.3,0.7, by=0.1), cex.axis=1.5) text(x=0.5, y=0.7, cex=1.4,"D") mtext("Activity level", side=2, line=2.2, cex=1.4) mtext("Body mass (kg)", side=1, line=2.2, cex=1.4) ################## Combine overlap estimates for lion and no lion overlap.lion <- read.csv("overlap.estimates.lion.csv") overlap.lion$lion <- 1 overlap.nolion <- read.csv("overlap.estimates.nolion.csv") overlap.nolion$lion <- 0 overlap.data <- rbind(overlap.lion,overlap.nolion) #### Get other data for analysis overlap.data$bodymass <- as.numeric(as.character(herb[match(overlap.data$species,herb$Database.name),"Bodymass..kg."])) overlap.data$logbm <- log10(overlap.data$bodymass) overlap.data$avg_temp <- as.numeric(as.character(overlap.data$temp.group)) overlap.s <- overlap.data overlap.s[6:7] <- scale(overlap.s[6:7]) library(glmmTMB) m1 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) * lion * avg_temp , data=overlap.s, family=beta_family) summary(m1) m2 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) * avg_temp + lion, data=overlap.s, family=beta_family) summary(m2) m3 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) * lion, data=overlap.s, family=beta_family) summary(m3) m4 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) * lion + avg_temp , data=overlap.s, family=beta_family) summary(m4) m5 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) + lion + avg_temp , data=overlap.s, family=beta_family) summary(m4) m6 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) + lion + logbm:lion + avg_temp + lion:avg_temp , data=overlap.s, family=beta_family) summary(m6) m7 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) + lion + logbm:lion + avg_temp , data=overlap.s, family=beta_family) summary(m7) m8 <- glmmTMB(overlap ~ (logbm + I(logbm^2)) * lion + avg_temp + lion:avg_temp , data=overlap.s, family=beta_family) summary(m8) m9 <- glmmTMB(overlap ~ logbm + I(logbm^2) , data=overlap.s, family=beta_family) summary(m7) AIC(m1,m2,m3,m4,m5,m6,m7,m8,m9) ######## Extended Data Table 4 ################ summary(m4) # make predictions for model 4 s <- list() s[[1]] <- seq(min(overlap.s$logbm),max(overlap.s$logbm),by=0.1) s[[2]] <- c(I(I(15-mean(overlap.data$avg_temp))/sd(overlap.data$avg_temp)), I(I(20-mean(overlap.data$avg_temp))/sd(overlap.data$avg_temp)), I(I(25-mean(overlap.data$avg_temp))/sd(overlap.data$avg_temp))) s[[3]] <- unique(overlap.s$lion) s[[4]] <- unique(overlap.s$species) grd <- expand.grid(a=1:length(s[[1]]),b=1:length(s[[2]]),c=1:length(s[[3]]),d=1:length(s[[4]])) mat <- NULL for(i in 1:nrow(grd)){ cur <- grd[i,] tmp <- cbind(s[[1]][cur[,1]],s[[2]][cur[,2]],s[[3]][cur[,3]],s[[4]][cur[,4]]) mat <- rbind(mat,tmp) } mat <- as.data.frame(mat) names(mat) <- c("logbm","avg_temp","lion","species") ## get predictions lion and 95% CI based on se of predictions (Wald-type) predat <- stats::predict(m4,newdata=mat,type="link",se.fit=T,allow.new.levels=T) mat$predict <- plogis(predat$fit) mat$lwr <- plogis(predat$fit-1.96*predat$se.fit) mat$upr <- plogis(predat$fit+1.96*predat$se.fit) ## average over sites overlap.predict <- aggregate(predict ~ logbm + avg_temp + lion, data=mat, FUN=mean) overlap.predict.lwr <- aggregate(lwr ~ logbm + avg_temp + lion, data=mat, FUN=mean) overlap.predict.upr <- aggregate(upr ~ logbm + avg_temp + lion, data=mat, FUN=mean) overlap.predict$predict.lwr <- overlap.predict.lwr$lwr overlap.predict$predict.upr <- overlap.predict.upr$upr ## back transform temperature and bodymass overlap.predict$logbm.t <- I(overlap.predict$logbm*sd(overlap.data$logbm)+mean(overlap.data$logbm)) overlap.predict$temp.t <- I(overlap.predict$avg_temp*sd(overlap.data$avg_temp)+mean(overlap.data$avg_temp)) # ranges are some for all three plots xrange <- range(overlap.predict$logbm.t) yrange <- range(overlap.predict$predict.upr,overlap.predict$predict.lwr) # making subsets for three plots overlap.predict$temp.t <- round(overlap.predict$temp.t,1) min.temp <- droplevels(subset(overlap.predict, temp.t==min(temp.t))) mean.temp <- droplevels(subset(overlap.predict, temp.t==round(median(temp.t),1))) max.temp <- droplevels(subset(overlap.predict, temp.t==max(temp.t))) ###### Fig. 2 ####### par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,3), oma = c(2, 2, 0.2, 0.2)) # plot for min temperature plot(xrange, yrange, ylim=c(0.4,0.92),bty="l", type="n",xlab="Log 10 Body mass (kg)", ylab="Predicted proportion of overlap with lion", labels=F) x <- min.temp[1:39,7] y1.low <- min.temp[1:39,5] y1.high <- min.temp[1:39,6] lines(predict ~ logbm.t, data=subset(min.temp,lion==0),col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- min.temp[40:78,5] y2.high <- min.temp[40:78,6] lines(predict ~ logbm.t, data=subset(min.temp,lion==1),col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) abline(v=log10(100), col="grey50", lty=2); abline(v=log10(550), col="grey50", lty=2) box(bty = 'l', lwd = 2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1.5) axis(2, at=seq(0.4, 0.9, by=0.1), labels=seq(0.4, 0.9, by=0.1), cex.axis=1.5) text(x=1.4, y=0.92, cex=1.4, paste("15 degrees C")) text(x=0.5, y=0.92, cex=1.4,"A") # plot for max temperature plot(xrange, yrange, type="n",xlab="Body mass (kg)",labels=FALSE, ylab="Predicted proportion of overlap with lion", ylim=c(0.4,0.92), bty="l") x <- max.temp[1:39,7] y1.low <- max.temp[1:39,5] y1.high <- max.temp[1:39,6] lines(predict ~ logbm.t, data=subset(max.temp,lion==0),col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- max.temp[40:78,5] y2.high <- max.temp[40:78,6] lines(predict ~ logbm.t, data=subset(max.temp,lion==1),col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) abline(v=log10(100), col="grey50", lty=2); abline(v=log10(550), col="grey50", lty=2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1.5) box(bty = 'l', lwd = 2) legend(0.4, 0.50, legend=c("",""), col=c("red","blue"), lty=c(1,2),lwd=2, cex=1.4, box.lty=0) text(x=1.4, y=0.92, cex=1.4, paste("25 degrees C")) text(x=0.5, y=0.92, cex=1.4,"B") ######### Lion presence shifts diel activity patterns ################## overlap.lion <- read.csv("overlap.estimates.lion.alltemp.csv") overlap.nolion <- read.csv("overlap.estimates.nolion.alltemp.csv") ## calculate difference for all species in both lion and no lion areas overlap.lion$lion <- 1 overlap.nolion$lion <- 0 select.overlap.lion <- droplevels(subset(overlap.nolion,species %in% levels(overlap.lion$species))) select.overlap.lion$overlap.lion <- overlap.lion[match(select.overlap.lion$species,overlap.lion$species),"overlap"] select.overlap.lion$Dif <- I(select.overlap.lion$overlap.lion - select.overlap.lion$overlap) select.overlap.lion <- merge(select.overlap.lion, species, by.x="species", by.y="Database.name") select.overlap.lion$logbm <- log10(select.overlap.lion$Bodymass..kg.) mt.1 <- lm(Dif ~ logbm + I(logbm^2), data=select.overlap.lion) summary(mt.1) predict15 <- predict(mt.1,interval = "confidence") select.overlap.lion$prediction <- predict15[,1] select.overlap.lion$prediction.lwr <- predict15[,2] select.overlap.lion$prediction.upr <- predict15[,3] select.overlap.lion <- select.overlap.lion[order(select.overlap.lion$logbm),] ###### Plot differences # ranges are some for all three plots xrange <- range(select.overlap.lion$logbm) yrange <- range(select.overlap.lion$Dif) ##### Fig. 3A ################# par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,2), oma = c(2, 2, 0.2, 0.2)) # plot for min temperature plot(xrange, yrange,bty="l",ylim=c(-0.25,0.25), type="n",xlab="Log 10 Body mass (kg)", ylab="Predicted lion effect on activity overlap", labels=FALSE, axes=F) points(Dif ~ logbm, data=select.overlap.lion, pch=16) x <- select.overlap.lion$logbm y1.low <- select.overlap.lion$prediction.lwr y1.high <- select.overlap.lion$prediction.upr polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0, 0, 0,0.3), border = NA) lines(prediction ~ logbm, data=select.overlap.lion, col="black", lwd=2) abline(v=log10(100), col="grey30", lty=2); abline(v=log10(550), col="grey30", lty=2) abline(h=0, col="grey30", lty=2) text(x=0.3,y=0.25, "A", pos=4) box(bty = 'l', lwd = 2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1) axis(2, at=seq(-0.2, 0.2, by=0.1), labels=seq(-0.2, 0.2, by=0.1), cex.axis=1) text(select.temp15$logbm, select.temp15$Dif, labels=select.temp15$species) ##### Estimate timing of activity herbivores ##### herb2 <- subset(herb.sel, herb.sel$Species %in% levels(select.overlap.lion$species)) herb2 <- merge(herb2, species, by.x="Species", by.y="Database.name") herb2.nolion <- droplevels(subset(herb2,Lion.p==0)) herb2.lion <- droplevels(subset(herb2,Lion.p==1)) cool.nolion <- aggregate.data.frame(herb2.nolion[,c(17)], by=list(herb2.nolion$Abbreviation,herb2.nolion$Species), FUN="mean") cool.lion <- aggregate.data.frame(herb2.lion[,c(17,23)], by=list(herb2.lion$Abbreviation,herb2.lion$Species), FUN="mean") new.data <- merge(cool.nolion, cool.lion, by="Group.2") new.data <- new.data[,c(1:3,5,6)] new.data$dif <- new.data[,3]-new.data[,4] names(new.data) <- c("Scientific_name", "Species", "No_lion", "Lion","Bodymass", "Dif") new.data$logbm <- log10(as.numeric(new.data$Bodymass)) new.data$Dif <- new.data$Dif *-1 mt.1 <- lm(Dif ~ logbm + I(logbm^2), data=new.data) summary(mt.1) predict15 <- predict(mt.1,interval = "confidence") new.data$prediction <- predict15[,1] new.data$prediction.lwr <- predict15[,2] new.data$prediction.upr <- predict15[,3] new.data <- new.data[order(new.data$logbm),] ###### Plot differences # ranges are some for all three plots xrange <- range(new.data$logbm) yrange <- range(new.data$Dif) ######## Fig. 3B ######################## par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(1,2), oma = c(2, 2, 0.2, 0.2)) # plot for min temperature plot(xrange, yrange,bty="l",ylim=c(-0.2,0.2), type="n",xlab="Log 10 Body mass (kg)", ylab="Predicted lion effect on activity overlap", labels=FALSE, axes=F) points(Dif ~ logbm, data=new.data, pch=16) x <- new.data$logbm y1.low <- new.data$prediction.lwr y1.high <- new.data$prediction.upr polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0, 0, 0,0.3), border = NA) lines(prediction ~ logbm, data=new.data, col="black", lwd=2) abline(v=log10(100), col="grey30", lty=2); abline(v=log10(550), col="grey30", lty=2) abline(h=0, col="grey30", lty=2) text(x=0.3,y=0.2, "B", pos=4) box(bty = 'l', lwd = 2) axis(1, at=seq(1, 3, by=1), labels=c(10, 100,1000), cex.axis=1) axis(2, at=seq(-0.2, 0.2, by=0.1), labels=seq(-0.2, 0.2, by=0.1), cex.axis=1) text(select.temp15$logbm, select.temp15$Dif, labels=select.temp15$species) ####### Diel activity pattern in the absence and presence of lion ################ act.herb.list.lion <- readRDS("act.herb.alltemp.list.lion.RData") act.herb.list.nolion <- readRDS("act.herb.alltemp.list.nolion.RData") ## get zebra data in areas with lions zeb.lion <- as.data.frame(act.herb.list.lion[[5]]@pdf) zeb.nolion <- as.data.frame(act.herb.list.nolion[[13]]@pdf) ## get wildebeest data in areas with lions wil.lion <- as.data.frame(act.herb.list.lion[[7]]@pdf) wil.nolion <- as.data.frame(act.herb.list.nolion[[3]]@pdf) ## get gemsbok data in areas with lions gem.lion <- as.data.frame(act.herb.list.lion[[27]]@pdf) gem.nolion <- as.data.frame(act.herb.list.nolion[[9]]@pdf) ## get waterbok data in areas with lions wat.lion <- as.data.frame(act.herb.list.lion[[12]]@pdf) wat.nolion <- as.data.frame(act.herb.list.nolion[[2]]@pdf) ## get kudu data in areas with lions kud.lion <- as.data.frame(act.herb.list.lion[[9]]@pdf) kud.nolion <- as.data.frame(act.herb.list.nolion[[1]]@pdf) ## get buffulo data in areas with lions buf.lion <- as.data.frame(act.herb.list.lion[[17]]@pdf) buf.nolion <- as.data.frame(act.herb.list.nolion[[18]]@pdf) ## get tsessebe data in areas with lions tse.lion <- as.data.frame(act.herb.list.lion[[20]]@pdf) tse.nolion <- as.data.frame(act.herb.list.nolion[[14]]@pdf) ## get hartebeest data in areas with lions har.lion <- as.data.frame(act.herb.list.lion[[8]]@pdf) har.nolion <- as.data.frame(act.herb.list.nolion[[5]]@pdf) ## get eland data in areas with lions ela.lion <- as.data.frame(act.herb.list.lion[[16]]@pdf) ela.nolion <- as.data.frame(act.herb.list.nolion[[8]]@pdf) ## get sable data in areas with lions sab.lion <- as.data.frame(act.herb.list.lion[[24]]@pdf) sab.nolion <- as.data.frame(act.herb.list.nolion[[17]]@pdf) all <- zeb.lion[,1:3] all <- cbind(all, zeb.nolion[,2:3]) all <- cbind(all, wil.lion[,2:3]) all <- cbind(all, wil.nolion[,2:3]) all <- cbind(all, gem.lion[,2:3]) all <- cbind(all, gem.nolion[,2:3]) all <- cbind(all, wat.lion[,2:3]) all <- cbind(all, wat.nolion[,2:3]) all <- cbind(all, kud.lion[,2:3]) all <- cbind(all, kud.nolion[,2:3]) all <- cbind(all, buf.lion[,2:3]) all <- cbind(all, buf.nolion[,2:3]) all <- cbind(all, tse.lion[,2:3]) all <- cbind(all, tse.nolion[,2:3]) all <- cbind(all, har.lion[,2:3]) all <- cbind(all, har.nolion[,2:3]) all <- cbind(all, ela.lion[,2:3]) all <- cbind(all, ela.nolion[,2:3]) all <- cbind(all, sab.lion[,2:3]) all <- cbind(all, sab.nolion[,2:3]) all[,2:41] <- all[,2:41]/4 all$x <- all$x/6.283185*24 names(all) <- c("hour", "zebra est lion", "zebra se lion", "zebra est no lion", "zebra se no lion", "wildebeest est lion", "wildebeest se lion", "wildebeest est no lion", "wildebeest se no lion", "gemsbok est lion", "gemsbok se lion", "gemsbok est no lion", "gemsbok se no lion", "waterbuck est lion", "waterbuck se lion", "waterbuck est no lion", "waterbuck se no lion","kudu est lion", "kudu se lion","kudu est no lion", "kudu se no lion", "buffalo est lion", "buffalo se lion", "buffalo est no lion", "buffalo se no lion", "tsessebe est lion", "tsessebe se lion", "tsessebe est no lion", "tsessebe se no lion", "hartebeest est lion", "hartebeest se lion", "hartebeest est no lion", "hartebeest se no lion", "eland est lion", "eland se lion", "eland est no lion", "eland se no lion", "sable est lion", "sable se lion", "sable est no lion", "sable se no lion") ####### Fig. 4 ########### par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(2,4), oma = c(4, 4, 1, 0.2)) x <- gem.nolion$x/6.283185*24 y <- gem.nolion$y/4 plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- har.nolion$lcl/4 y1.high <- har.nolion$ucl/4 lines((har.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- har.lion$lcl/4 y2.high <- har.lion$ucl/4 lines((har.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"A", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- wil.nolion$lcl/4 y1.high <- wil.nolion$ucl/4 lines((wil.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- wil.lion$lcl/4 y2.high <- wil.lion$ucl/4 lines((wil.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"B", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- wat.nolion$lcl/4 y1.high <- wat.nolion$ucl/4 lines((wat.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- wat.lion$lcl/4 y2.high <- wat.lion$ucl/4 lines((wat.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"C", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- kud.nolion$lcl/4 y1.high <- kud.nolion$ucl/4 lines((kud.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- kud.lion$lcl/4 y2.high <- kud.lion$ucl/4 lines((kud.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"D", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- zeb.nolion$lcl/4 y1.high <- zeb.nolion$ucl/4 lines((zeb.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- zeb.lion$lcl/4 y2.high <- zeb.lion$ucl/4 lines((zeb.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"E", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- gem.nolion$lcl/4 y1.high <- gem.nolion$ucl/4 lines((gem.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- gem.lion$lcl/4 y2.high <- gem.lion$ucl/4 lines((gem.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"F", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- ela.nolion$lcl/4 y1.high <- ela.nolion$ucl/4 lines((ela.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- ela.lion$lcl/4 y2.high <- ela.lion$ucl/4 lines((ela.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"G", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- buf.nolion$lcl/4 y1.high <- buf.nolion$ucl/4 lines((buf.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- buf.lion$lcl/4 y2.high <- buf.lion$ucl/4 lines((buf.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"H", cex=3) box(bty = 'l', lwd = 2) ###### Extended Data Fig. 4 ############################# war.lion <- as.data.frame(act.herb.list.lion[[1]]@pdf) war.nolion <- as.data.frame(act.herb.list.nolion[[15]]@pdf) wrhi.lion <- as.data.frame(act.herb.list.lion[[2]]@pdf) wrhi.nolion <- as.data.frame(act.herb.list.nolion[[19]]@pdf) bus.lion <- as.data.frame(act.herb.list.lion[[13]]@pdf) bus.nolion <- as.data.frame(act.herb.list.nolion[[20]]@pdf) gdui.lion <- as.data.frame(act.herb.list.lion[[11]]@pdf) gdui.nolion <- as.data.frame(act.herb.list.nolion[[12]]@pdf) rdui.lion <- as.data.frame(act.herb.list.lion[[22]]@pdf) rdui.nolion <- as.data.frame(act.herb.list.nolion[[27]]@pdf) ele.lion <- as.data.frame(act.herb.list.lion[[14]]@pdf) ele.nolion <- as.data.frame(act.herb.list.nolion[[11]]@pdf) gir.lion <- as.data.frame(act.herb.list.lion[[3]]@pdf) gir.nolion <- as.data.frame(act.herb.list.nolion[[6]]@pdf) shar.lion <- as.data.frame(act.herb.list.lion[[10]]@pdf) shar.nolion <- as.data.frame(act.herb.list.nolion[[7]]@pdf) imp.lion <- as.data.frame(act.herb.list.lion[[6]]@pdf) imp.nolion <- as.data.frame(act.herb.list.nolion[[4]]@pdf) nya.lion <- as.data.frame(act.herb.list.lion[[4]]@pdf) nya.nolion <- as.data.frame(act.herb.list.nolion[[24]]@pdf) sprb.lion <- as.data.frame(act.herb.list.lion[[28]]@pdf) sprh.lion <- as.data.frame(act.herb.list.lion[[26]]@pdf) ste.lion <- as.data.frame(act.herb.list.lion[[15]]@pdf) tse.nolion <- as.data.frame(act.herb.list.nolion[[14]]@pdf) cree.nolion <- as.data.frame(act.herb.list.nolion[[33]]@pdf) mree.nolion <- as.data.frame(act.herb.list.nolion[[29]]@pdf) kli.nolion <- as.data.frame(act.herb.list.nolion[[26]]@pdf) rhe.nolion <- as.data.frame(act.herb.list.nolion[[32]]@pdf) hip.nolion <- as.data.frame(act.herb.list.nolion[[30]]@pdf) hyr.nolion <- as.data.frame(act.herb.list.nolion[[31]]@pdf) ble.nolion <- as.data.frame(act.herb.list.nolion[[28]]@pdf) ## Plot par(mar=c(0.5, 0.5, 0.2, 0.2), mfrow=c(8,4), oma = c(4, 4, 1, 0.2)) x <- gem.nolion$x/6.283185*24 y <- gem.nolion$y/4 plot(x, y,bty="l",ylim=c(0,0.16), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- shar.nolion$lcl/4 y1.high <- shar.nolion$ucl/4 lines((shar.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- shar.lion$lcl/4 y2.high <- shar.lion$ucl/4 lines((shar.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.16, by=0.04), labels=seq(0, 0.16, by=0.04), cex.axis=2) text(1.2,0.158,"A", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.16), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- hyr.nolion$lcl/4 y1.high <- hyr.nolion$ucl/4 lines((hyr.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.158,"B", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.16), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y2.low <- sprh.lion$lcl/4 y2.high <- sprh.lion$ucl/4 lines((sprh.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.158,"C", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.16), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y2.low <- ste.lion$lcl/4 y2.high <- ste.lion$ucl/4 lines((ste.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.158,"D", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- rdui.nolion$lcl/4 y1.high <- rdui.nolion$ucl/4 lines((rdui.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- rdui.lion$lcl/4 y2.high <- rdui.lion$ucl/4 lines((rdui.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"E", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- kli.nolion$lcl/4 y1.high <- kli.nolion$ucl/4 lines((kli.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"F", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- gdui.nolion$lcl/4 y1.high <- gdui.nolion$ucl/4 lines((gdui.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- gdui.lion$lcl/4 y2.high <- gdui.lion$ucl/4 lines((gdui.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"G", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- rhe.nolion$lcl/4 y1.high <- rhe.nolion$ucl/4 lines((rhe.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"H", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- bus.nolion$lcl/4 y1.high <- bus.nolion$ucl/4 lines((bus.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- bus.lion$lcl/4 y2.high <- bus.lion$ucl/4 lines((bus.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"I", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- mree.nolion$lcl/4 y1.high <- mree.nolion$ucl/4 lines((mree.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"J", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y2.low <- sprb.lion$lcl/4 y2.high <- sprb.lion$ucl/4 lines((sprb.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"K", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- imp.nolion$lcl/4 y1.high <- imp.nolion$ucl/4 lines((imp.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- imp.lion$lcl/4 y2.high <- imp.lion$ucl/4 lines((imp.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"L", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- cree.nolion$lcl/4 y1.high <- cree.nolion$ucl/4 lines((cree.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"M", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- war.nolion$lcl/4 y1.high <- war.nolion$ucl/4 lines((war.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- war.lion$lcl/4 y2.high <- war.lion$ucl/4 lines((war.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"N", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- ble.nolion$lcl/4 y1.high <- ble.nolion$ucl/4 lines((ble.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"O", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- nya.nolion$lcl/4 y1.high <- nya.nolion$ucl/4 lines((nya.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- nya.lion$lcl/4 y2.high <- nya.lion$ucl/4 lines((nya.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"P", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- tse.nolion$lcl/4 y1.high <- tse.nolion$ucl/4 lines((tse.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"Q", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- har.nolion$lcl/4 y1.high <- har.nolion$ucl/4 lines((har.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- har.lion$lcl/4 y2.high <- har.lion$ucl/4 lines((har.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"R", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- wil.nolion$lcl/4 y1.high <- wil.nolion$ucl/4 lines((wil.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- wil.lion$lcl/4 y2.high <- wil.lion$ucl/4 lines((wil.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"S", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- wat.nolion$lcl/4 y1.high <- wat.nolion$ucl/4 lines((wat.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- wat.lion$lcl/4 y2.high <- wat.lion$ucl/4 lines((wat.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"T", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- kud.nolion$lcl/4 y1.high <- kud.nolion$ucl/4 lines((kud.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- kud.lion$lcl/4 y2.high <- kud.lion$ucl/4 lines((kud.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"U", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- zeb.nolion$lcl/4 y1.high <- zeb.nolion$ucl/4 lines((zeb.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- zeb.lion$lcl/4 y2.high <- zeb.lion$ucl/4 lines((zeb.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"V", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- gem.nolion$lcl/4 y1.high <- gem.nolion$ucl/4 lines((gem.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- gem.lion$lcl/4 y2.high <- gem.lion$ucl/4 lines((gem.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"W", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- ela.nolion$lcl/4 y1.high <- ela.nolion$ucl/4 lines((ela.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- ela.lion$lcl/4 y2.high <- ela.lion$ucl/4 lines((ela.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"X", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- buf.nolion$lcl/4 y1.high <- buf.nolion$ucl/4 lines((buf.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- buf.lion$lcl/4 y2.high <- buf.lion$ucl/4 lines((buf.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=F, cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(1.2,0.118,"Y", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- gir.nolion$lcl/4 y1.high <- gir.nolion$ucl/4 lines((gir.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- gir.lion$lcl/4 y2.high <- gir.lion$ucl/4 lines((gir.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(1.2,0.118,"Z", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- hip.nolion$lcl/4 y1.high <- hip.nolion$ucl/4 lines((hip.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(2.2,0.118,"AA", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- wrhi.nolion$lcl/4 y1.high <- wrhi.nolion$ucl/4 lines((wrhi.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- wrhi.lion$lcl/4 y2.high <- wrhi.lion$ucl/4 lines((wrhi.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=F, cex.axis=2) text(2.2,0.118,"AB", cex=3) box(bty = 'l', lwd = 2) plot(x, y,bty="l",ylim=c(0,0.12), axes=F,labels=F, col="white") rect(xleft=0, xright=8, ybottom=0, ytop=1, col='grey90', border=FALSE) rect(xleft=20, xright=24, ybottom=0, ytop=1, col='grey90', border=FALSE) y1.low <- ele.nolion$lcl/4 y1.high <- ele.nolion$ucl/4 lines((ele.nolion$y/4) ~ x, col="blue",lty=2, lwd=2) polygon(c(x, rev(x)), c(y1.high, rev(y1.low)), col=rgb(0,0,1,0.4), border = NA) y2.low <- ele.lion$lcl/4 y2.high <- ele.lion$ucl/4 lines((ele.lion$y/4) ~ x, col="red",lty=1, lwd=2) polygon(c(x, rev(x)), c(y2.high, rev(y2.low)), col=rgb(1,0,0,0.4), border = NA) axis(1, at=seq(0, 24, by=6), labels=seq(0, 24, by=6), cex.axis=2) axis(2, at=seq(0, 0.12, by=0.04), labels=seq(0, 0.12, by=0.04), cex.axis=2) text(2.2,0.118,"AC", cex=3) box(bty = 'l', lwd = 2)