I am trying to generate a heatmap in R for a dataset, which has a broad value range. The dataset mostly contains zeros which shall be colored white. Most of the remaining value are range between 1 and 200 with a decreasing density. A few values range between 201 and 16000.
I would like to create colored bins for the heatmap in advance, for instance:
0 white
1-20 green
21-70 yellow
71-200 orange
201-16000 red
Any ideas on that?
Thx!
The function
heatmap.2ingplotshas built-in breaks definition.