The RColorBrewer package is an unavoidable tool to manage colors with R. However, the default palettes give only about 10 different colors. There is a tip for who needs more colors in his graph but still wants to use this useful package.


Not what you are looking for ? Make a new search !



Leave a Reply

1 Comment on "#40 RColorBrewer : get a longer palette"

newest oldest most voted
Notify of

You can condense this into one line of code; for example to be used with R’s library(pheatmap):

color = colorRampPalette(rev(brewer.pal(n = 7, name = “BuPu”)))(100))