I am trying to make a temperature map, all works fine but I don’t know how to have a fixed color palette.
Actually I have this :
rgb.palette <- colorRampPalette(c("blue","green","yellow","orange","red"),
space = "Lab")
image.plot(akima.smooth,
col = rgb.palette(NBR.COLORS),
main=main_title,
horizontal=TRUE,
axes=TRUE)
This solution works but the colors which are painted are always from blue to red.
For example if the lowest temperature on the map is -10°C the color will be blue, but in another map if the lowest temperature is +25°C that color will be blue too.
How can I define a fixed color panel such as :
-30°C => blue
-20°C => light blue
-10°C => dark green
0°C => green
10°C => yellow
If in map 1 lowest temperature is -20 I want “light blue” and in map 2 if lowest temperature is 10°C I want “yellow” color.
I used this solution :