Skip to content

Instantly share code, notes, and snippets.

@keuv-grvl
Created September 7, 2017 10:58
Show Gist options
  • Save keuv-grvl/5f70b0d258e2dd4fabdb88b23275c3b4 to your computer and use it in GitHub Desktop.
Save keuv-grvl/5f70b0d258e2dd4fabdb88b23275c3b4 to your computer and use it in GitHub Desktop.
Generate a ggplot2 color palette
# generate a ggplot2 color palette
gg_color_hue <- function(n) {
hues = seq(15, 375, length = n + 1)
hcl(h = hues, l = 65, c = 100)[1:n]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment