Adding legend to heatmap

Viewed 801

I'm trying to build a heatmap using the heatmap() funtion. I was able to obtain the graph with its dendogram and to set the color using the RColorBrewer Palette. What I would like to do now is add a legend color bar on the side of the heatmap that show the range of colors used from the lowest to the highest value. Can anyone help me in doing this? Thank you!

0 Answers
Related