Skip to content

Instantly share code, notes, and snippets.

@cararthompson
Created June 8, 2026 16:45
Show Gist options
  • Select an option

  • Save cararthompson/ea01abdce535f589dc60a88f340ed7d6 to your computer and use it in GitHub Desktop.

Select an option

Save cararthompson/ea01abdce535f589dc60a88f340ed7d6 to your computer and use it in GitHub Desktop.
theme_glasgow()
# The main theme - what can you add?
theme_glasgow <- function(base_text_size = 16) {
theme_minimal(base_size = base_text_size) +
theme(
text = element_text(
family = "Noto Sans",
colour = "#343536"
),
axis.text = element_text(
colour = "#343536"
),
axis.title = element_text(
colour = "#343536"
),
plot.margin = margin_auto(
base_text_size * 1.5
),
plot.title = element_text(
family = "Noto Serif",
size = rel(1.6),
colour = "#011451",
face = "bold",
margin = margin(base_text_size * .75, 0, base_text_size * .75, 0)
),
plot.subtitle = marquee::element_marquee(
width = 1,
lineheight = 1.2,
# family = "Atkinson Hyperlegible Next",
colour = "#343536",
size = rel(1.1),
margin = margin(b = 12)
),
plot.background = element_rect(fill = "#F6F5FA", colour = "#F6F5FA"),
panel.grid = element_line(colour = "white"),
legend.text = element_text(
colour = "#343536"
),
plot.title.position = "plot",
legend.title = element_text(
colour = "#343536",
face = "bold"
),
geom = element_geom(ink = "#343536", family = "Noto Sans")
)
}
# Tooltip styling
glasgow_tooltip_css <- "background-color:#011451;color:#f2f6ff;opacity: 0.9; padding:7.5px;letter-spacing:0.025em;line-height:1.3;border-radius:5px;font-family:Noto Sans;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment