giovannellilab / geochem

Geochemistry pipeline for processing and visualising data from IRMS, IC and ICP-MS
https://github.com/giovannellilab/geochem
Other
0 stars 0 forks source link

Use GLab theme in all plots #21

Closed guillecg closed 3 months ago

alebastianoni commented 3 months ago

Here's the glab theme

tema del lab

theme_glab <- function(base_size = 11,#tema del lab base_family = "", base_line_size = base_size / 180, base_rect_size = base_size / 180) {

font <- "Helvetica" #assign font family up front

theme_bw(base_size = base_size,
            base_family = base_family,
            base_line_size = base_line_size) %+replace%
theme(
    legend.background =  element_blank(),
    legend.title =       element_text(color = rgb(100, 100, 100, maxColorValue = 255),
                                      size = rel(0.65),
                                     hjust = 0),
    legend.text =        element_text(color = rgb(100, 100, 100, maxColorValue = 255),
                                      size = rel(0.65)),
    legend.key.size =    unit(0.8, "lines"),

  plot.title = element_text(
    color = rgb(100, 100, 100, maxColorValue = 255),
    hjust = 0),

  axis.title = element_text(
    color = rgb(100, 100, 100, maxColorValue = 255),
    size = rel(0.65)),
  axis.text = element_text(
    color = rgb(100, 100, 100, maxColorValue = 255),
    size = rel(0.65)),

  plot.caption = element_text(
    color = rgb(100, 100, 100, maxColorValue = 255),
    size = rel(0.35),
    hjust = 1),

  panel.grid.major = element_blank(),  
  panel.grid.minor = element_blank(),  
  panel.border = element_rect(fill = NA, colour = rgb(100, 100, 100, maxColorValue = 255)),

  complete = TRUE
)

}

guillecg commented 3 months ago

Solved in 00a68944e35e1441a2334833a9facb3c6a8900cf