How can you set the 0-point on the color scale to white in this heatmap? Does it use the breaks parameter?
breaks
In the following code, white is set to 3 (or near
Here's a generic solution similar to @Megatron but a little easier to program. It basically set the minimum and maximum color scale values to be equal in magnitude.
range <- max(abs(matrix)); pheatmap(matrix, breaks = seq(-range, range, length.out = 100))