randomcoloR icon indicating copy to clipboard operation
randomcoloR copied to clipboard

In a new R session, the distinctColorPalette does not reproduce colors though seed is set

Open Puriney opened this issue 5 years ago • 0 comments

library(scales)
set.seed(2020)
c <- randomcoloR::distinctColorPalette(k = 20)
print(c)
print(rnorm(10))
pdf("test.pdf", width = 7)
scales::show_col(c)
dev.off()

It worked for the same R session like mentioned in this issue (https://github.com/ronammar/randomcoloR/issues/3). However, if you re-start an R session and re-run the above codes, the colors are different.

Any idea?


I fixed this issue here: https://github.com/ronammar/randomcoloR/pull/14

Puriney avatar Apr 30 '20 15:04 Puriney