aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Kellner <ken@kenkellner.com>2018-08-13 20:48:07 (GMT)
committerKen Kellner <ken@kenkellner.com>2018-08-13 20:48:07 (GMT)
commit6d741817f89bbb60fca2bbf8b6d13488bddbfd6f (patch)
treecc9f8e56d60ce0e697d5afaaf2a61a626408230c
parent7c2f2ad171fb86b4216158be63be9ae356ec1dcf (diff)
Fix y-axis labels
-rw-r--r--figures/fig4_frag_mam.R11
-rw-r--r--figures/fig5_frag_bat.R10
-rw-r--r--figures/fig6_frag_bird.R10
-rw-r--r--figures/fig7_frag_turtle.R14
4 files changed, 26 insertions, 19 deletions
diff --git a/figures/fig4_frag_mam.R b/figures/fig4_frag_mam.R
index e79635b..d965cc2 100644
--- a/figures/fig4_frag_mam.R
+++ b/figures/fig4_frag_mam.R
@@ -2,8 +2,9 @@
## Figure 4 Niche Breadth Effect on Fragmentation Response: Mammals ##
######################################################################
-load(outpath('out_mam_lvl2.Rdata'))
-load(outpath('out_mam_lvl1.Rdata'))
+source('../filepath.R')
+load(paste(out.dir,'/out_mam_lvl2.Rdata',sep=''))
+load(paste(out.dir,'/out_mam_lvl1.Rdata',sep=''))
gen.fig <- function(mod,xaxt=NULL){
@@ -27,8 +28,8 @@ add.num <- function(mod,x,y,yadj){
}
-
-tiff(filename=outpath("fig4_frag_mam.tiff"),width=90,height=90,units="mm",res=1000, pointsize=5,
+tiff(filename=paste(out.dir,"/fig4_frag_mam.tiff",sep=''),
+ width=90,height=90,units="mm",res=1000, pointsize=5,
compression = "lzw",type='cairo')
par(mar = c(4,4.5,0.5,2) + 0.1)
@@ -58,7 +59,7 @@ text(-1.3,0.09,'(d) IP',cex=1.3,adj = c(0,0))
add.num(mam.IP,1.1,-0.085,0.02)
###############
-mtext(expression("Effect of fragmentation index"),2,-2,outer=2,cex=1.3)
+mtext(expression("Response to landscape modification"),2,-2,outer=2,cex=1.3)
mtext(expression("Niche breadth"),1,-1.5,outer=2,cex=1.3)
dev.off()
diff --git a/figures/fig5_frag_bat.R b/figures/fig5_frag_bat.R
index 8c6f49f..29d5c50 100644
--- a/figures/fig5_frag_bat.R
+++ b/figures/fig5_frag_bat.R
@@ -2,8 +2,9 @@
## Figure 5 Niche Breadth Effect on Fragmentation Response: Bats ##
###################################################################
-load(paste(out.dir,'out_bat_lvl2.Rdata',sep=""))
-load(paste(out.dir,'out_bat_lvl1.Rdata',sep=""))
+source('../filepath.R')
+load(paste(out.dir,'/out_bat_lvl2.Rdata',sep=''))
+load(paste(out.dir,'/out_bat_lvl1.Rdata',sep=''))
gen.fig <- function(mod,xaxt=NULL){
@@ -26,7 +27,8 @@ add.num <- function(mod,x,y,yadj){
}
-tiff(filename=outpath("fig5_frag_bat.tiff"),width=90,height=90,units="mm",res=1000, pointsize=5,
+tiff(filename=paste(out.dir,"/fig5_frag_bat.tiff",sep=''),
+ width=90,height=90,units="mm",res=1000, pointsize=5,
compression = "lzw",type='cairo')
par(mar = c(4,4.5,0.5,2) + 0.1)
@@ -56,7 +58,7 @@ text(-1.25,0.085,'(d) IP',cex=1.3,adj = c(0,0))
add.num(bat.IP,0.95,-0.030,0.008)
###############
-mtext(expression("Effect of fragmentation index"),2,-2,outer=2,cex=1.3)
+mtext(expression("Response to landscape modification"),2,-2,outer=2,cex=1.3)
mtext(expression("Niche breadth"),1,-1.5,outer=2,cex=1.3)
dev.off()
diff --git a/figures/fig6_frag_bird.R b/figures/fig6_frag_bird.R
index bf3ade4..373587a 100644
--- a/figures/fig6_frag_bird.R
+++ b/figures/fig6_frag_bird.R
@@ -2,8 +2,9 @@
## Figure 6 Niche Breadth Effect on Fragmentation Response: Birds ##
####################################################################
-load(outpath('out_bird_lvl2.Rdata'))
-load(outpath('out_bird_lvl1.Rdata'))
+source('../filepath.R')
+load(paste(out.dir,'/out_bird_lvl2.Rdata',sep=''))
+load(paste(out.dir,'/out_bird_lvl1.Rdata',sep=''))
gen.fig <- function(mod,xaxt=NULL){
@@ -26,7 +27,8 @@ add.num <- function(mod,x,y,yadj){
}
-tiff(filename=outpath("fig6_frag_bird.tiff"),width=90,height=90,units="mm",res=1000, pointsize=5,
+tiff(filename=paste(out.dir,"/fig6_frag_bird.tiff",sep=''),
+ width=90,height=90,units="mm",res=1000, pointsize=5,
compression = "lzw",type='cairo')
par(mar = c(4,4.5,0.5,2) + 0.1)
@@ -56,7 +58,7 @@ text(-1.7,0.095,'(d) IP',cex=1.3,adj = c(0,0))
add.num(bird.IP,2.1,-0.075,0.017)
###############
-mtext(expression("Effect of fragmentation index"),2,-2,outer=2,cex=1.3)
+mtext(expression("Response to landscape modification"),2,-2,outer=2,cex=1.3)
mtext(expression("Niche breadth"),1,-1.5,outer=2,cex=1.3)
dev.off()
diff --git a/figures/fig7_frag_turtle.R b/figures/fig7_frag_turtle.R
index d97e72d..d25c23f 100644
--- a/figures/fig7_frag_turtle.R
+++ b/figures/fig7_frag_turtle.R
@@ -2,8 +2,9 @@
## Figure 7 Niche Breadth Effect on Fragmentation Response: Turtles ##
######################################################################
-load(paste(out.dir,'out_turtle_lvl2.Rdata',sep=""))
-load(paste(out.dir,'out_turtle_lvl1.Rdata',sep=""))
+source('../filepath.R')
+load(paste(out.dir,'/out_turtle_lvl2.Rdata',sep=''))
+load(paste(out.dir,'/out_turtle_lvl1.Rdata',sep=''))
gen.fig <- function(mod,xaxt=NULL){
@@ -26,7 +27,8 @@ add.num <- function(mod,x,y,yadj){
}
-tiff(filename=outpath("fig7_frag_turtle.tiff"),width=90,height=90,units="mm",res=1000, pointsize=5,
+tiff(filename=paste(out.dir,"/fig7_frag_turtle.tiff",sep=''),
+ width=90,height=90,units="mm",res=1000, pointsize=5,
compression = "lzw",type='cairo')
par(mar = c(4,4.5,0.5,2) + 0.1)
@@ -40,7 +42,7 @@ add.num(turtle.NN,-0.8,-0.095,0.013)
#Pane 2: model IN
par(fig=c(0.45,1,0.45,1),new=TRUE)
gen.fig(turtle.IN,xaxt='n')
-text(1.3,0.065,'(b) IN',cex=1.3,adj = c(0,0))
+text(1.3,0.1,'(b) IN',cex=1.3,adj = c(0,0))
add.num(turtle.IN,1.55,-0.038,0.012)
##Pane 3: model NP
@@ -56,7 +58,7 @@ text(-1.2,0.102,'(d) IP',cex=1.3,adj = c(0,0))
add.num(turtle.IP,1.55,-0.038,0.012)
###############
-mtext(expression("Effect of fragmentation index"),2,-2,outer=2,cex=1.3)
+mtext(expression("Response to landscape modification"),2,-2,outer=2,cex=1.3)
mtext(expression("Niche breadth"),1,-1.5,outer=2,cex=1.3)
-dev.off() \ No newline at end of file
+dev.off()