Skip to content

Commit

Permalink
Create randomcolor.R
Browse files Browse the repository at this point in the history
  • Loading branch information
chansigit authored Mar 31, 2021
1 parent eebc921 commit 59e7e15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions randomcolor.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
library(RColorBrewer)
n <- 35
qual_col_pals = brewer.pal.info[brewer.pal.info$category == 'qual',] # one of 'div', 'qual', 'seq'
col_vector = unlist(mapply(brewer.pal, qual_col_pals$maxcolors, rownames(qual_col_pals)))
col_vector=sample(col_vector)
pie(rep(1,n), col=sample(col_vector, n))

0 comments on commit 59e7e15

Please sign in to comment.