Skip to content

Commit

Permalink
increase text size on figures
Browse files Browse the repository at this point in the history
  • Loading branch information
icrichmond committed Mar 28, 2024
1 parent 530d242 commit e7c02aa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
20 changes: 10 additions & 10 deletions R/create_figure_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ create_figure_1 <- function(model_max_temp, model_min_temp, model_noise, model_h
maxtemp <- plot_temp_model(model_max_temp) + ggtitle("a) Maximum air\ntemperature")
mintemp <- plot_temp_model(model_min_temp) + ggtitle("b) Minimum air\ntemperature")

habitat <- plot_provisioning(model_habitat) + ggtitle("e) Habitat provision for\npollinators")
habitat <- plot_provisioning(model_habitat) + ggtitle("e) Habitat\nprovision for\npollinators")
food <- plot_provisioning(model_food) + ggtitle("d) Food provision")

noise <- plot_noise(model_noise) + ggtitle("c) Anthropogenic noise")
noise <- plot_noise(model_noise) + ggtitle("c) Anthropogenic\nnoise")

legend <- get_legend(noise)

Expand Down Expand Up @@ -47,8 +47,8 @@ plot_temp_model <- function(model){
"Alley area","Alley length", "Ground cover", "Midstory cover","Canopy cover")) +
scale_color_manual(values = c( "#21908CFF", "#440154FF", "#47C16EFF", "#FDE725FF")) +
theme(legend.position = "none",
plot.title = element_text(size = 14, face = "bold"),
axis.text = element_text(size = 14))
plot.title = element_text(size = 16, face = "bold"),
axis.text = element_text(size = 16))

return(maxtemp_plot)

Expand Down Expand Up @@ -90,8 +90,8 @@ plot_provisioning <- function(model) {
"Alley area","Alley length", "Ground cover", "Midstory cover","Canopy cover")) +
scale_color_manual(values = c("#FDE725FF", "#47C16EFF", "#440154FF")) +
theme(legend.position = "none",
plot.title = element_text(size = 14, face = "bold"),
axis.text = element_text(size = 14))
plot.title = element_text(size = 16, face = "bold"),
axis.text = element_text(size = 16))

return(floral_plot)

Expand Down Expand Up @@ -139,10 +139,10 @@ plot_noise <- function(model){
"Public art: common", "Public art: rare", "Main roads (50m buffer)", "Building cover (50m buffer)", "Vegetation cover (50m buffer)", "Canopy cover (50m buffer)",
"Alley area","Alley length", "Ground cover", "Midstory cover","Canopy cover")) +
scale_color_manual(values = c("#FDE725FF", "#47C16EFF", "#21908CFF", "#440154FF")) +
theme(plot.title = element_text(size = 14, face = "bold"),
axis.text = element_text(size = 14),
legend.text = element_text(size = 14),
legend.title = element_text(size = 14))
theme(plot.title = element_text(size = 16, face = "bold"),
axis.text = element_text(size = 16),
legend.text = element_text(size = 16),
legend.title = element_text(size = 16))

return(plot)
}
5 changes: 4 additions & 1 deletion R/create_figure_2.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ create_figure_2 <- function(rv) {
p <- plot_predictions(floral, condition = "Groundcover_avg") +
geom_point(data = rv, aes(x = Groundcover_avg, y = Floral_coverage_per_m2)) +
labs(x = "Ground cover vegetation (%)", y = expression("Floral Coverage ("*m^2*")")) +
theme_classic()
theme_classic() +
theme(axis.text = element_text(size = 14),
legend.text = element_text(size = 14),
legend.title = element_text(size = 14))

ggsave('graphics/Figure2.png', p, dpi = 450)

Expand Down
16 changes: 5 additions & 11 deletions R/create_figure_3.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ create_figure_3 <- function(temp_plot, road_area, rv) {
can <- plot_predictions(mod, condition = c("percan")) +
geom_point(data = df, aes(x = percan, y = mean_NDSI)) +
labs(x = "Percent Canopy Cover @ 50 m", y = "Mean NDSI") +
theme_classic()
theme_classic() +
theme(axis.text = element_text(size = 14),
legend.text = element_text(size = 14),
legend.title = element_text(size = 14))

#build <- plot_predictions(mod, condition = c("perbuild")) +
# geom_point(data = df, aes(x = perbuild, y = mean_NDSI)) +
# labs(x = "Percent Building Cover @ 50 m", y = "Mean NDSI") +
# theme_classic()


p <- can #+ build


ggsave('graphics/Figure3.png', p, width = 10, height = 8, units = c('in'), dpi = 450)
ggsave('graphics/Figure3.png', can, width = 10, height = 8, units = c('in'), dpi = 450)

}
Binary file modified graphics/Figure1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/Figure2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e7c02aa

Please sign in to comment.