The heatmap I am using creates a gradient from 0.7 to 1.3 using heatmap.2
:
heatmap.2(lifespan.matrix, col=bluered, breaks=c(seq(0.7,1.3,0.01)),
Rowv = FALSE, Colv = FALSE, trace="none", main="Lifespan")
In the heatmap you can see the gradient emerge ending oftenly in a solid blue line. This happens because of zero values in the matrix at these points.
I'd like to change this color, in the matrix noted as 0, into a different color i.e. yellow. Could anyone help me with this problem?
You specify the exact colors associated with the breaks.