|
|
|
|
|
|
|
|
axis.title = ggplot2::element_text(size = title_font_size * 0.8), |
|
|
axis.title = ggplot2::element_text(size = title_font_size * 0.8), |
|
|
axis.ticks = ggplot2::element_line(color = blend(0.8)), |
|
|
axis.ticks = ggplot2::element_line(color = blend(0.8)), |
|
|
axis.text = ggplot2::element_text(color = blend(0.4)), |
|
|
axis.text = ggplot2::element_text(color = blend(0.4)), |
|
|
legend.key = element_rect(fill = "transparent", colour = NA), |
|
|
|
|
|
|
|
|
legend.key = ggplot2::element_rect(fill = "transparent", colour = NA), |
|
|
plot.caption = ggplot2::element_text( |
|
|
plot.caption = ggplot2::element_text( |
|
|
size = text_font_size * 0.8, |
|
|
size = text_font_size * 0.8, |
|
|
color = blend(0.3) |
|
|
color = blend(0.3) |
|
|
|
|
|
|
|
|
"sf" = list(color = text_color) |
|
|
"sf" = list(color = text_color) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
geom_names <- setNames(nm = names(xaringan_theme_defaults)) |
|
|
|
|
|
|
|
|
geom_names <- purrr::set_names(names(xaringan_theme_defaults)) |
|
|
|
|
|
|
|
|
previous_defaults <- lapply( |
|
|
previous_defaults <- lapply( |
|
|
geom_names, |
|
|
geom_names, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
restore_default <- utils::modifyList(xaringanthemer_env$std_ggplot_defaults, old_default) |
|
|
restore_default <- utils::modifyList(xaringanthemer_env$std_ggplot_defaults, old_default) |
|
|
|
|
|
|
|
|
geom_names <- setNames(nm = names(restore_default)) |
|
|
|
|
|
|
|
|
geom_names <- purrr::set_names(names(restore_default)) |
|
|
previous_defaults <- lapply( |
|
|
previous_defaults <- lapply( |
|
|
geom_names, |
|
|
geom_names, |
|
|
function(geom) safely_set_geom(geom, restore_default[[geom]]) |
|
|
function(geom) safely_set_geom(geom, restore_default[[geom]]) |
|
|
|
|
|
|
|
|
direction = 1, |
|
|
direction = 1, |
|
|
inverse = FALSE |
|
|
inverse = FALSE |
|
|
) { |
|
|
) { |
|
|
|
|
|
requires_package("ggplot2", "scale_xaringan_discrete") |
|
|
|
|
|
|
|
|
aes_type <- match.arg(aes_type) |
|
|
aes_type <- match.arg(aes_type) |
|
|
color <- hex2HCL(get_theme_accent_color(color, inverse)) |
|
|
color <- hex2HCL(get_theme_accent_color(color, inverse)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end = 1, |
|
|
end = 1, |
|
|
inverse = FALSE |
|
|
inverse = FALSE |
|
|
) { |
|
|
) { |
|
|
|
|
|
requires_package("ggplot2", "scale_xaringan_continuous") |
|
|
|
|
|
requires_package("scales", "scale_xaringan_continuous") |
|
|
aes_type <- match.arg(aes_type) |
|
|
aes_type <- match.arg(aes_type) |
|
|
color <- hex2HCL(get_theme_accent_color(color, inverse)) |
|
|
color <- hex2HCL(get_theme_accent_color(color, inverse)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
color_blender <- function(x, y) function(alpha = 0.5) blend_colors(x, y, alpha) |
|
|
color_blender <- function(x, y) function(alpha = 0.5) blend_colors(x, y, alpha) |
|
|
|
|
|
|
|
|
hex2HCL <- function(x) { |
|
|
hex2HCL <- function(x) { |
|
|
colorspace::coords(as(colorspace::hex2RGB(x), "polarLUV")) |
|
|
|
|
|
|
|
|
colorspace::coords(methods::as(colorspace::hex2RGB(x), "polarLUV")) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|