Actually, I have another question based on this.
Suppose I have two datasets, with similar coordinates but different rainfall values. In df1, as the dataset you created, the values vary from 100 to 550. While in df2, the values vary from 50 to 800. Then I use the same scale_fill_distiller in order to put the two figures on one panel. The code is shown below:
fill_com = scale_fill_distiller('pr',palette='Spectral', breaks = c(200, 400))
figure1= ggplot(df1, aes(x, y, fill = COL)) + geom_tile() + theme_classic() + fill_com
figure2= ggplot(df2, aes(x, y, fill = COL)) + geom_tile() + theme_classic() + fill_com
ggarrange(figure1, figure2, ncol=2, nrow=1, common.legend = TRUE, legend="bottom")
But I think the color bar depends on the dataframe with the lowest range (550 in this case, rather than 800), such as df1. Thus, the high values in df2 does not show on the color bar. How to solve that? Thanks again.