Skip to content

Commit

Permalink
✨ figure update but tiering is missing....
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaS08 committed Oct 15, 2024
1 parent 9fcc9b1 commit 1dee8e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions code/figures.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
library(here)
library(readr)
library(scales)
library(tidyverse)

# set path to code sub dir
setwd(here("code"))

#### Structure ####

df <- list.files(path = "data/processed/", pattern = ".csv", full.names = TRUE) %>%
df <- list.files(path = "../data/processed/", pattern = ".csv", full.names = TRUE) %>%
lapply(read_csv) %>%
bind_rows %>%
select(-c(network, richness)) %>%
Expand Down Expand Up @@ -39,11 +43,12 @@ summary <-
theme_classic() +
xlab("time") +
ylab("value") +
coord_cartesian(clip = "off") +
theme(panel.border = element_rect(colour = 'black',
fill = "#ffffff00"),
axis.ticks.x = element_blank())

ggsave("figures/summary.png",
ggsave("../figures/summary.png",
summary,
width = 9000,
height = 5000,
Expand All @@ -52,7 +57,7 @@ ggsave("figures/summary.png",

#### Extinctions ####

df_ext <- read_csv("data/processed/extinctions/extinctions.csv") %>%
df_ext <- read_csv("../data/processed/extinctions/extinctions.csv") %>%
select(-c(id, links, richness)) %>%
# to get the ratio
mutate(ratio = top/basal,
Expand Down Expand Up @@ -96,7 +101,7 @@ summary +
group = model),
linetype = "dashed")

ggsave("figures/extinction.png",
ggsave("../figures/extinction.png",
width = 9000,
height = 6000,
units = "px",
Expand All @@ -123,11 +128,12 @@ ggplot() +
theme_classic() +
xlab("time") +
ylab("value") +
coord_cartesian(clip = "off") +
theme(panel.border = element_rect(colour = 'black',
fill = "#ffffff00"),
axis.ticks.x = element_blank())

ggsave("figures/extinction_all_results.png",
ggsave("../figures/extinction_all_results.png",
width = 9000,
height = 5000,
units = "px",
Expand Down
Binary file modified figures/extinction.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 figures/extinction_all_results.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 figures/summary.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 1dee8e6

Please sign in to comment.