Skip to content

Instantly share code, notes, and snippets.

@Myfanwy
Last active September 14, 2022 21:57
Show Gist options
  • Save Myfanwy/3409053fbcb5cee79f2aa84cd0bc81ef to your computer and use it in GitHub Desktop.
Save Myfanwy/3409053fbcb5cee79f2aa84cd0bc81ef to your computer and use it in GitHub Desktop.
a ggplot2 thank you
# requires Megrim font: https://fonts.google.com/specimen/Megrim
if(FALSE) {
install.packages("extrafont")
extrafont::loadfonts()
}
library(ggplot2)
ggplot() +
scale_x_continuous(expand = c(0,0)) +
scale_y_continuous(expand = c(0,0)) +
geom_text(aes(x =1.5, y = 1.5),
label = "hey thanks",
family = "Megrim",
size = 36) +
theme_gray() +
labs(x = NULL, y = NULL) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment