Add voldep slides

This commit is contained in:
2025-05-18 20:30:26 +02:00
parent 6fed9201f5
commit 00ce3d9dd9
11 changed files with 791 additions and 0 deletions

View File

@@ -53,3 +53,38 @@ cols %>%
scale_x_discrete(expand = c(0, 0)) +
scale_y_discrete(expand = c(0, 0)) +
theme_minimal() -> plot_cols
col_gas <- "blue"
col_eua <- "green"
col_oil <- "amber"
col_coal <- "brown"
col_scale2 <- function(x, rng_t) {
ret <- x
for (i in seq_along(x)) {
if (x[i] < rng_t[1]) {
ret[i] <- col_scale(rng_t[1])
} else if (x[i] > rng_t[2]) {
ret[i] <- col_scale(rng_t[2])
} else {
ret[i] <- col_scale(x[i])
}
}
return(ret)
}
rng_t <- c(-5, 5)
h_sub <- c(1, 5, 30)
col_scale <- scales::gradient_n_pal(
c(
cols[5, "green"],
cols[5, "light-green"],
cols[5, "yellow"],
# cols[5, "amber"],
cols[5, "orange"],
# cols[5, "deep-orange"],
cols[5, "red"]
),
values = seq(rng_t[1], rng_t[2], length.out = 5)
)