Skip to content

Instantly share code, notes, and snippets.

@jgilfillan
Created February 12, 2017 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgilfillan/f8cd5b55605312caadc65841c26fe911 to your computer and use it in GitHub Desktop.
Save jgilfillan/f8cd5b55605312caadc65841c26fe911 to your computer and use it in GitHub Desktop.
Griffith ggplot2 palettes
scale_fill_griffith <- function(theme="uni_groups", tech_key = list(
uni_groups = c("#c12525", "#6F2C91", "#F36F21", "#00AEEF", "#50B848"), # GU, AEL, BUS, HTH, SCG
groups = c("#6F2C91", "#F36F21", "#00AEEF", "#50B848"), # AEL, BUS, HTH, SCG
gu_nat = c("#c12525", "#989898"), # GU, National
gu_qut_uq = c("#c12525", "#1f77b4", "#9467bd"), # GU, National
gu_uq_qut = c("#c12525", "#9467bd", "#1f77b4") # GU, National
)) {
scale_fill_manual(values=tech_key[[theme]])
}
ggplot(data = mtcars, aes(x = factor(cyl), y = hp, fill = factor(cyl))) +
geom_bar(stat = "identity") +
scale_fill_griffith("gu_uq_qut")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment