I wanted to map a range of values to a specific range of colours in a heatmap. For example, the range 1.0 - 2.0 will be plotted against the range of colours from #2b8a44 - #00ff43
.
I have to plot multiple heatmaps iteratively so the range of numbers to the range of colours should always be the same and cannot change at every iteration.
An example to plot can be:
xa = [[5.45.45, 4.11, 4.054, 4.678, 13.854, 4.0098, 4],
[1.75, 9.0943, 4.34, 3.34, 9.89, 1, 4.998],
[4.76, 8.54, 1.34, 7.35, 1.2342, 4.0576, 8]]
The range of values will be till 18. That is is 1-2, 2-3.....17-18.
I have referred to this answer, unfortunately it did not help.