Skip to content

Instantly share code, notes, and snippets.

@bryanmayer
Last active August 10, 2016 04:00
Show Gist options
  • Save bryanmayer/000ff6cc61015369fc9af7cf89d44ef7 to your computer and use it in GitHub Desktop.
Save bryanmayer/000ff6cc61015369fc9af7cf89d44ef7 to your computer and use it in GitHub Desktop.
library(ggplot2)
library(RColorBrewer)
gg_color_hue <- function(n) {
hues = seq(15, 375, length = n + 1)
hcl(h = hues, l = 65, c = 100)[1:n]
}
n = 4
cols = gg_color_hue(n)
# red = "#F8766D"
# blue = "#00BFC4"
dev.new(width = 4, height = 4)
plot(1:n, pch = 16, cex = 2, col = cols)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment