R/theme_test_adam.r

Defines functions theme_test_adam

theme_test_adam <- function(base_size = 14, base_family = "", base_line_size = base_size/22, 
                            base_rect_size = base_size/22) {
  half_line <- base_size/2
  theme(line = element_line(colour = "black", linewidth = base_line_size, 
                            linetype = 1, lineend = "butt"), rect = element_rect(fill = "white", 
                                                                                 colour = "black", linewidth = base_rect_size, linetype = 1), 
        text = element_text(family = base_family, face = "plain", 
                            colour = "black", size = base_size, lineheight = 0.9, 
                            hjust = 0.5, vjust = 0.5, angle = 0, margin = margin(), 
                            debug = FALSE), axis.line = element_blank(), axis.line.x = NULL, 
        axis.line.y = NULL, axis.text = element_text(size = rel(0.8), 
                                                     colour = "grey30"), axis.text.x = element_blank(), axis.text.y = element_blank(), axis.ticks = element_blank(), 
        axis.title.x = element_blank(), 
        axis.title.y = element_blank(),legend.background = element_rect(colour = NA), 
        legend.spacing = unit(2 * half_line, "pt"), legend.spacing.x = NULL, 
        legend.spacing.y = NULL, legend.margin = margin(0, 0, 
                                                        0, 0, "cm"), legend.key = NULL, legend.key.size = unit(1.2, 
                                                                                                               "lines"), legend.key.height = NULL, legend.key.width = NULL, 
        legend.key.spacing = unit(half_line, "pt"), legend.key.spacing.x = NULL, 
        legend.key.spacing.y = NULL, legend.text = element_text(size = rel(0.8)), 
        legend.title = element_text(hjust = 0), legend.ticks.length = rel(0.2), 
        legend.position = "right", legend.direction = NULL, legend.justification = "center", 
        legend.box = NULL, legend.box.margin = margin(0, 0, 0, 
                                                      0, "cm"), legend.box.background = element_blank(), 
        legend.box.spacing = unit(2 * half_line, "pt"), panel.background = element_rect(fill = "white", 
                                                                                        colour = NA), panel.border = element_rect(fill = NA, 
                                                                                                                                  colour = "grey20"), panel.grid.major = element_blank(), 
        panel.grid.minor = element_blank(), panel.spacing = unit(half_line, 
                                                                 "pt"), panel.spacing.x = NULL, panel.spacing.y = NULL, 
        panel.ontop = FALSE, strip.background = element_rect(fill = "grey85", 
                                                             colour = "grey20"), strip.clip = "inherit", strip.text = element_text(colour = "grey10", 
                                                                                                                                   size = rel(0.8), margin = margin(0.8 * half_line, 
                                                                                                                                                                    0.8 * half_line, 0.8 * half_line, 0.8 * half_line)), 
        strip.text.x = NULL, strip.text.y = element_text(angle = -90), 
        strip.text.y.left = element_text(angle = 90), strip.placement = "inside", 
        strip.placement.x = NULL, strip.placement.y = NULL, strip.switch.pad.grid = unit(half_line/2, 
                                                                                         "pt"), strip.switch.pad.wrap = unit(half_line/2, 
                                                                                                                             "pt"), plot.background = element_rect(colour = "white"), 
        plot.title = element_text(size = rel(1.2), hjust = 0, 
                                  vjust = 1, margin = margin(b = half_line)), plot.title.position = "panel", 
        plot.subtitle = element_text(hjust = 0, vjust = 1, margin = margin(b = half_line)), 
        plot.caption = element_text(size = rel(0.8), hjust = 1, 
                                    vjust = 1, margin = margin(t = half_line)), plot.caption.position = "panel", 
        plot.tag = element_text(size = rel(1.2), hjust = 0.5, 
                                vjust = 0.5), plot.tag.position = "topleft", plot.margin = margin(half_line, 
                                                                                                  half_line, half_line, half_line), complete = TRUE)
  
}
LobsterScience/bio.lobster documentation built on Feb. 14, 2025, 3:28 p.m.