Hello,
I'd like to create a continuous gradient of warm colors (e.g., yellow-orange-red) from the values 4-9 using heatmap2. Can anyone please suggest code to replace "col=bluered(100)" in the code below?
> heatmap.2(as.matrix(dataSub), Colv=FALSE, Rowv=FALSE, trace="none", dendrogram="none", scale="none", density.info="none", breaks = seq(4,9, length.out = 101), col=bluered(100), cexCol=0.75,margins=c(15,24))
I've tried colorRampPalette but can't seem to get what I'm looking for.
Thanks very much for any help.
Hi Kevin, thanks for your help and quick response, looking at your example helped solve the problem. I guess I was trying to use one less color in the gradient than needed for the number of breaks. Using your example I changed it to "col=colorRampPalette(c("yellow", "orange", "red"))(100)" and this seems to have resolved the issue. Thank you for your time and help, stay safe and well.