Title says all: I would like to plot a SpatRaster map using terra so that all values below a certain threshold have a color, all above another threshold have another color (say, all values below -2 are red and all values above 10 are blue), with a continuous palette in between. I can only find information on defining colors based on interval and class, but nothing for a continuous palette.
I tried something among the lines of the first answer in https://stackoverflow.com/questions/73624247, but it doesn't quite apply to my situation.