#40_colorRampPalette_and_RcolorBrewer

 

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 !

[mediatagger]

 


1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Matt.0 Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Matt.0
Guest
Matt.0

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))