@@ -40,28 +40,26 @@ levels(mod.lter$trophic_level)
40
40
mod.lter $ N_years <- as.numeric(mod.lter $ N_years )
41
41
mod.lter $ start_year <- as.numeric(mod.lter $ start_year )
42
42
43
+ stripParams <- list (cex = 2 , lines = 1.5 )
44
+
43
45
png(" figures/LTER_SITES.png" , width = 2000 , height = 600 , pointsize = 20 )
44
46
xyplot(mod.lter $ N_years ~ mod.lter $ slope | mod.lter $ trophic_level ,
47
+ par.strip.text = stripParams ,
48
+ par.settings = list (strip.background = list (col = " lightgray" )),
45
49
col = ifelse(mod.lter $ p_value < = 0.05 ,' red' ,' black' ),
46
- pch = 19 , cex = 1 ,
47
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
48
- xlab = " Slope" , ylab = " Number of years" ,
50
+ pch = 19 , cex = 1.2 ,
51
+ xlab = list (label = " Slope" , cex = 2.2 ),
52
+ ylab = list (label = " Number of years" , cex = 2.2 ),
53
+ scales = list (cex = 1.5 ),
49
54
abline = c(v = 0 , lwd = 3 ))
50
55
dev.off()
51
56
52
- xyplot(mod.lter $ slope ~ mod.lter $ start_year | mod.lter $ trophic_level ,
53
- col = ifelse(mod.lter $ p_value < 0.05 ,' red' ,' black' ),
54
- pch = 19 , cex = 1 ,
55
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
56
- xlab = " Start Year" , ylab = " Slope" )
57
-
58
57
59
58
# # Konza Prairie
60
59
mod.konza <- read.csv(file = " model_output/model_konza.csv" )
61
60
options(scipen = 999 )
62
61
mod.konza $ p_value <- round(mod.konza $ p_value , digits = 10 )
63
62
mod.konza $ intercept_p_value <- round(mod.konza $ intercept_p_value , digits = 10 )
64
- cols <- c(" black" , " red" )
65
63
66
64
str(mod.konza )
67
65
mod.konza $ trophic_level <- as.factor(mod.konza $ trophic_level )
@@ -71,19 +69,16 @@ mod.konza$start_year <- as.numeric(mod.konza$start_year)
71
69
72
70
png(" figures/Konza_Prairie.png" , width = 1600 , height = 600 , pointsize = 20 )
73
71
xyplot(mod.konza $ N_years ~ mod.konza $ slope | mod.konza $ trophic_level ,
74
- col = ifelse(mod.konza $ p_value < 0.05 ,' red' ,' black' ),
75
- pch = 19 , cex = 1 ,
76
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
77
- xlab = " Slope" , ylab = " Number of years" ,
72
+ par.strip.text = stripParams ,
73
+ par.settings = list (strip.background = list (col = " lightgray" )),
74
+ col = ifelse(mod.konza $ p_value < = 0.05 ,' red' ,' black' ),
75
+ pch = 19 , cex = 1.2 ,
76
+ xlab = list (label = " Slope" , cex = 2.2 ),
77
+ ylab = list (label = " Number of years" , cex = 2.2 ),
78
+ scales = list (cex = 1.8 ),
78
79
abline = c(v = 0 , lwd = 3 ))
79
80
dev.off()
80
81
81
- xyplot(mod.konza $ slope ~ mod.konza $ start_year | mod.konza $ trophic_level ,
82
- col = ifelse(mod.konza $ p_value < 0.05 ,' red' ,' black' ),
83
- pch = 19 , cex = 1 ,
84
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
85
- xlab = " Start Year" , ylab = " Slope" , abline = c(h = 0 , lwd = 3 ))
86
-
87
82
ggplot(mod.konza , aes(N_years , slope , colour = trophic_level )) + geom_point() + theme_classic()
88
83
ggplot(mod.konza , aes(N_years , slope_se , colour = trophic_level )) + geom_point() + theme_classic()
89
84
ggplot(mod.konza , aes(N_years , p_value , colour = trophic_level )) + geom_point() + theme_bw()
@@ -105,20 +100,16 @@ mod.hbrook$start_year <- as.numeric(mod.hbrook$start_year)
105
100
106
101
png(" figures/Hubbard_Brook.png" , width = 1600 , height = 600 , pointsize = 20 )
107
102
xyplot(mod.hbrook $ N_years ~ mod.hbrook $ slope | mod.hbrook $ trophic_level ,
108
- col = ifelse(mod.hbrook $ p_value < 0.05 ,' red' ,' black' ),
109
- pch = 19 , cex = 1 ,
110
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
111
- xlab = " Slope" , ylab = " Number of years" ,
103
+ par.strip.text = stripParams ,
104
+ par.settings = list (strip.background = list (col = " lightgray" )),
105
+ col = ifelse(mod.hbrook $ p_value < = 0.05 ,' red' ,' black' ),
106
+ pch = 19 , cex = 1.2 ,
107
+ xlab = list (label = " Slope" , cex = 2.2 ),
108
+ ylab = list (label = " Number of years" , cex = 2.2 ),
109
+ scales = list (cex = 1.5 ),
112
110
abline = c(v = 0 , lwd = 3 ))
113
111
dev.off()
114
112
115
- xyplot(mod.hbrook $ slope ~ mod.hbrook $ start_year | mod.hbrook $ trophic_level ,
116
- col = ifelse(mod.hbrook $ p_value < 0.05 ,' red' ,' black' ),
117
- pch = 19 , cex = 1 ,
118
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
119
- xlab = " Start Year" , ylab = " Slope" , abline = c(h = 0 , lwd = 3 ))
120
-
121
-
122
113
# # North Temperate Lakes
123
114
mod.ntlakes <- read.csv(file = " model_output/model_north_temperate_lakes.csv" )
124
115
options(scipen = 999 )
@@ -133,21 +124,18 @@ mod.ntlakes$start_year <- as.numeric(mod.ntlakes$start_year)
133
124
134
125
png(" figures/North_Temperate_Lakes.png" , width = 1600 , height = 600 , pointsize = 20 )
135
126
xyplot(mod.ntlakes $ N_years ~ mod.ntlakes $ slope | mod.ntlakes $ trophic_level ,
136
- col = ifelse(mod.ntlakes $ p_value < 0.05 ,' red' ,' black' ),
137
- pch = 19 , cex = 1 ,
138
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
139
- xlab = " Slope" , ylab = " Number of years" ,
127
+ par.strip.text = stripParams ,
128
+ par.settings = list (strip.background = list (col = " lightgray" )),
129
+ col = ifelse(mod.ntlakes $ p_value < = 0.05 ,' red' ,' black' ),
130
+ pch = 19 , cex = 1.2 ,
131
+ xlab = list (label = " Slope" , cex = 2.2 ),
132
+ ylab = list (label = " Number of years" , cex = 2.2 ),
133
+ scales = list (cex = 1.5 ),
140
134
abline = c(v = 0 , lwd = 3 ))
141
135
dev.off()
142
136
143
- xyplot(mod.ntlakes $ slope ~ mod.ntlakes $ start_year | mod.ntlakes $ trophic_level ,
144
- col = ifelse(mod.ntlakes $ p_value < 0.05 ,' red' ,' black' ),
145
- pch = 19 , cex = 1 ,
146
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
147
- xlab = " Start Year" , ylab = " Slope" , abline = c(h = 0 , lwd = 3 ))
148
-
149
137
150
- # # North Temperate Lakes
138
+ # # Santa Barbara Coastal
151
139
mod.sbcoastal <- read.csv(file = " model_output/model_santa_barbara_coastal.csv" )
152
140
options(scipen = 999 )
153
141
mod.sbcoastal $ p_value <- round(mod.sbcoastal $ p_value , digits = 10 )
@@ -161,16 +149,13 @@ mod.sbcoastal$start_year <- as.numeric(mod.sbcoastal$start_year)
161
149
162
150
png(" figures/Santa_Barbara_Coastal.png" , width = 1600 , height = 600 , pointsize = 20 )
163
151
xyplot(mod.sbcoastal $ N_years ~ mod.sbcoastal $ slope | mod.sbcoastal $ trophic_level ,
164
- col = ifelse(mod.sbcoastal $ p_value < 0.05 ,' red' ,' black' ),
165
- pch = 19 , cex = 1 ,
166
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
167
- xlab = " Slope" , ylab = " Number of years" ,
152
+ par.strip.text = stripParams ,
153
+ par.settings = list (strip.background = list (col = " lightgray" )),
154
+ col = ifelse(mod.sbcoastal $ p_value < = 0.05 ,' red' ,' black' ),
155
+ pch = 19 , cex = 1.2 ,
156
+ xlab = list (label = " Slope" , cex = 2.2 ),
157
+ ylab = list (label = " Number of years" , cex = 2.2 ),
158
+ scales = list (cex = 1.5 ),
168
159
abline = c(v = 0 , lwd = 3 ))
169
160
dev.off()
170
161
171
- xyplot(mod.sbcoastal $ slope ~ mod.sbcoastal $ start_year | mod.sbcoastal $ trophic_level ,
172
- col = ifelse(mod.sbcoastal $ p_value < 0.05 ,' red' ,' black' ),
173
- pch = 19 , cex = 1 ,
174
- strip = strip.custom(bg = " lightgrey" , par.strip.text = list (col = " black" , cex = 1 , font = 2 )),
175
- xlab = " Start Year" , ylab = " Slope" , abline = c(h = 0 , lwd = 3 ))
176
-
0 commit comments