56 lines
1.4 KiB
R
56 lines
1.4 KiB
R
text_size <- 16
|
|
linesize <- 1
|
|
width <- 12
|
|
height <- 6
|
|
|
|
# col_lightgray <- "#e7e7e7"
|
|
# col_blue <- "#F24159"
|
|
# col_b_smooth <- "#F7CE14"
|
|
# col_p_smooth <- "#58A64A"
|
|
# col_pointwise <- "#772395"
|
|
# col_b_constant <- "#BF236D"
|
|
# col_p_constant <- "#F6912E"
|
|
# col_optimum <- "#666666"
|
|
|
|
# https://www.schemecolor.com/retro-rainbow-pastels.php
|
|
col_lightgray <- "#e7e7e7"
|
|
col_blue <- "#F24159"
|
|
col_b_smooth <- "#5391AE"
|
|
col_p_smooth <- "#85B464"
|
|
col_pointwise <- "#E2D269"
|
|
col_b_constant <- "#7A4E8A"
|
|
col_p_constant <- "#BC677B"
|
|
col_optimum <- "#666666"
|
|
col_auto <- "#EA915E"
|
|
|
|
T_selection <- c(32, 128, 512)
|
|
|
|
# Lambda grid
|
|
lamgrid <- c(-Inf, 2^(-15:25))
|
|
|
|
# Gamma grid
|
|
gammagrid <- sort(1 - sqrt(seq(0, 0.99, .05)))
|
|
|
|
material_pals <- c(
|
|
"red", "pink", "purple", "deep-purple", "indigo",
|
|
"blue", "light-blue", "cyan", "teal", "green", "light-green", "lime",
|
|
"yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"
|
|
)
|
|
cols <- purrr::map(material_pals, ~ ggsci::pal_material(.x)(10)) %>%
|
|
purrr::reduce(cbind)
|
|
colnames(cols) <- material_pals
|
|
|
|
cols %>%
|
|
as_tibble() %>%
|
|
mutate(idx = as.factor(1:10)) %>%
|
|
pivot_longer(-idx, names_to = "var", values_to = "val") %>%
|
|
mutate(var = factor(var, levels = material_pals[19:1])) %>%
|
|
ggplot() +
|
|
xlab(NULL) +
|
|
ylab(NULL) +
|
|
geom_tile(aes(x = idx, y = var, fill = val)) +
|
|
scale_fill_identity() +
|
|
scale_x_discrete(expand = c(0, 0)) +
|
|
scale_y_discrete(expand = c(0, 0)) +
|
|
theme_minimal() -> plot_cols
|