Skip to content

Instantly share code, notes, and snippets.

@Shians
Last active March 8, 2019 00:47
Show Gist options
  • Select an option

  • Save Shians/8652d8cf9ee8d37352fcd0d06561e0cf to your computer and use it in GitHub Desktop.

Select an option

Save Shians/8652d8cf9ee8d37352fcd0d06561e0cf to your computer and use it in GitHub Desktop.
My preferred options for ggplot2
theme_set(
theme_classic() +
theme(
panel.grid.major = element_line(colour = "gray"),
plot.title = element_text(
face = "plain",
size = rel(20/12),
hjust = 1/2,
margin = margin(t = 10, b = 20)
)
)
)
scale_colour_discrete <- function(...) scale_colour_brewer(..., palette="Set1")
scale_fill_discrete <- function(...) scale_fill_brewer(... , palette="Set1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment