Why plots using heatmap and heatmap.2 might look different?

Well, there are a lot of cases even if you use the same parameters, but here is one I faced.

Here I am, trying to plot the heatmap of my data using the standart heatmap function:


and then, with exactly the same parameters I run the gplots function:


and what do I see? the plots’ colors look completely different, like the data has been changed…
After some staring and debugging ( and thanks to @lundstrj’s awesome testing skills), here is what I found:
Even thought the documentation states that the default scale for the heatmap function is “none” if the matrix is not symmetrical:

scale character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is "row" if symm false, and "none" otherwise.

I’ve noticed that it actually defaults to “row” anyways. And wrong scaling can change your heatmap completely! So beware to scale by the unique experiments(on the rows in my case) to make the result more appearing. and don’t forget to add the scale parameter to the gplots function:


Happy plotting!

*I’ve skipped the dendrograms and rows and columns names since in this example it’s only the image that matters

**The heatmap.2 plot is going to look a bit different after all – because of the different dimensions of the plot and modifications of the color range.