Skip to content

Commit feba4f5

Browse files
committed
updated figures
1 parent 1026c43 commit feba4f5

6 files changed

+37
-52
lines changed

figures/Hubbard_Brook.png

2.46 KB
Loading

figures/Konza_Prairie.png

2.99 KB
Loading

figures/LTER_SITES.png

2.04 KB
Loading

figures/North_Temperate_Lakes.png

2.49 KB
Loading

figures/Santa_Barbara_Coastal.png

2.1 KB
Loading

model_analyses.R

+37-52
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,26 @@ levels(mod.lter$trophic_level)
4040
mod.lter$N_years <- as.numeric(mod.lter$N_years)
4141
mod.lter$start_year <- as.numeric(mod.lter$start_year)
4242

43+
stripParams <- list(cex=2, lines=1.5)
44+
4345
png("figures/LTER_SITES.png", width = 2000, height = 600, pointsize = 20)
4446
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")),
4549
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),
4954
abline=c(v=0, lwd = 3))
5055
dev.off()
5156

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-
5857

5958
## Konza Prairie
6059
mod.konza <- read.csv(file="model_output/model_konza.csv")
6160
options(scipen = 999)
6261
mod.konza$p_value <- round(mod.konza$p_value, digits = 10)
6362
mod.konza$intercept_p_value <- round(mod.konza$intercept_p_value, digits = 10)
64-
cols <- c("black", "red")
6563

6664
str(mod.konza)
6765
mod.konza$trophic_level <- as.factor(mod.konza$trophic_level)
@@ -71,19 +69,16 @@ mod.konza$start_year <- as.numeric(mod.konza$start_year)
7169

7270
png("figures/Konza_Prairie.png", width = 1600, height = 600, pointsize = 20)
7371
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),
7879
abline=c(v=0, lwd = 3))
7980
dev.off()
8081

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-
8782
ggplot(mod.konza, aes(N_years, slope, colour = trophic_level)) + geom_point() + theme_classic()
8883
ggplot(mod.konza, aes(N_years, slope_se, colour = trophic_level)) + geom_point() + theme_classic()
8984
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)
105100

106101
png("figures/Hubbard_Brook.png", width = 1600, height = 600, pointsize = 20)
107102
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),
112110
abline=c(v=0, lwd = 3))
113111
dev.off()
114112

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-
122113
## North Temperate Lakes
123114
mod.ntlakes <- read.csv(file="model_output/model_north_temperate_lakes.csv")
124115
options(scipen = 999)
@@ -133,21 +124,18 @@ mod.ntlakes$start_year <- as.numeric(mod.ntlakes$start_year)
133124

134125
png("figures/North_Temperate_Lakes.png", width = 1600, height = 600, pointsize = 20)
135126
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),
140134
abline=c(v=0, lwd = 3))
141135
dev.off()
142136

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-
149137

150-
## North Temperate Lakes
138+
## Santa Barbara Coastal
151139
mod.sbcoastal <- read.csv(file="model_output/model_santa_barbara_coastal.csv")
152140
options(scipen = 999)
153141
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)
161149

162150
png("figures/Santa_Barbara_Coastal.png", width = 1600, height = 600, pointsize = 20)
163151
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),
168159
abline=c(v=0, lwd = 3))
169160
dev.off()
170161

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

Comments
 (0)