I'm visualizing a data set with the heatmap.2
function from the gplots
package in R. Basically I'm performing a hierarchical clustering analysis on the original data, while forcing the heatmap to display a limited version of the data (between -3 and +3) to limit the effect of outliers on the appearance of the heatmap, while still retaining the original clustering. When I use the full data set (fullmousedatamat
), it works just fine. However, when I use a partial data set (partialmousedatamat
), and want to plot it using the same key as the full data set, a couple colors are dropped out of the key and I can't figure out why.
Here is a gist containing the relevant data sets and analyses:
https://gist.github.com/jeffbruce/7412f567ac57fe1721a3
Notice how the 4th color on either side of the centre white color are dropped out. This feels like a bug to me maybe. I get the following warning message which I'm not sure how to interpret:
Warning message:
In image.default(z = matrix(z, ncol = 1), col = col, breaks = tmpbreaks, :
unsorted 'breaks' will be sorted before use
Thanks for your help!