Skip to content

Commit

Permalink
Merge pull request #23 from drieslab/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jiajic authored Nov 7, 2023
2 parents 74c8429 + 202e1a2 commit 7610aae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/color_palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ getDistinctColors <- function(n) {
# if too many colors warn about recycling
if(n > length(broad_colors)) {
warning('\n not enough unique colors in R, maximum = 444 \n')
set.seed(1234)
on.exit(set.seed(Sys.time()))
col_vector = sample(x = broad_colors, size = n, replace = TRUE)
} else {
col_vector = sample(x = broad_colors, size = n, replace = FALSE)
Expand Down

0 comments on commit 7610aae

Please sign in to comment.