I am producing a series of colour-coded plots in R. Using the ggplot2 command scale_fill_gradientn(name="Intensity", colours=rainbow(5, start = 0.5, end = 0))
produces the following examples:
The problem with this is that Figure 1 has a much higher range of 'Intensity' values than Figure 2. As a result, red on Figure 2 represents a much lower Intensity value than red on Figure 1. I'd like to standardise the scale so that red and blue are at the same points for each graph. Although this will make the differences in Figure 2 harder to visualise, this is what I'm aiming for.
Is there some way of modifying scale_fill_gradientn
so that I can specify at which values different colours should be assigned?