Skip to content

Instantly share code, notes, and snippets.

@JoFrhwld
Created October 1, 2024 17:10
Show Gist options
  • Save JoFrhwld/9d02988938d34dd32a4e5fccfb6136a4 to your computer and use it in GitHub Desktop.
Save JoFrhwld/9d02988938d34dd32a4e5fccfb6136a4 to your computer and use it in GitHub Desktop.
Setting default colors
options(
ggplot2.discrete.colour = lapply(1:12, ggthemes::ptol_pal()),
ggplot2.discrete.fill = lapply(1:12, ggthemes::ptol_pal()),
ggplot2.ordinal.colour = \(x, ...) scale_color_viridis_d(option = "G", direction = -1, ...),
ggplot2.ordinal.fill = \(x, ...) scale_fill_viridis_d(option = "G", direction = -1, ...),
ggplot2.continuous.colour = \(x,...) scico::scale_color_scico(palette = "batlow", ...),
ggplot2.continuous.fill = \(x,...) scico::scale_fill_scico(palette = "batlow", ...)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment