This is a test version of Biostars. For the public version, visit https://www.biostars.org.
changing heatmap color using heatmap.3

Hi,

Does anyone know how to change the heatmap color in heatmap.3

I want to change color.FUN = gplots::bluered to something different. So far I have tried heat.colors(3) and col = colorRampPalette(c("lightyellow", "red")) without any success.

Any guesses?

r heatmap

1 answer

Try this:

# colorRampPalette is in the RColorBrewer package.  This creates a colour palette that shades from light yellow to red in RGB space with 100 unique colours
scaleyellowred <- colorRampPalette(c("lightyellow", "red"), space = "rgb")(100)

Source

Thanks @arnstrm. Unfortunately, that still didn't work.

Log in to answer this question.