Skip to content

Instantly share code, notes, and snippets.

@gchacaltana
Created December 23, 2020 05:50
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 gchacaltana/3c38b565ffc714d717d5e190ad981191 to your computer and use it in GitHub Desktop.
Save gchacaltana/3c38b565ffc714d717d5e190ad981191 to your computer and use it in GitHub Desktop.
Custom theme ggplot
theme_bluewhite <- function (base_size = 11, base_family = "") {
theme_bw() %+replace%
theme(
panel.grid.major = element_line(color = "white"),
panel.background = element_rect(fill = "lightblue"),
panel.border = element_rect(color = "lightblue", fill = NA),
axis.line = element_line(color = "lightblue"),
axis.ticks = element_line(color = "lightblue"),
axis.text = element_text(color = "steelblue")
)
}
# Usando nuevo tema
ggplot(dataset, aes(columnA, columnB)) +
geom_boxplot() +
theme_bluewhite()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment