I have a data set on sea ambient temperatures that looks like this:
Date timestamp SW
11/1/2017 02:00:00 AM 17.8804
11/1/2017 04:00:00 AM 17.8106
11/1/2017 06:00:00 AM 17.752
11/1/2017 08:00:00 AM 17.7315
11/1/2017 10:00:00 AM 17.9066
11/1/2017 12:00:00 PM 18.1229
11/1/2017 02:00:00 PM 18.5551
11/1/2017 04:00:00 PM 19.2719
11/1/2017 06:00:00 PM 18.6102
11/1/2017 08:00:00 PM 18.0809
11/1/2017 10:00:00 PM 17.9975
11/2/2017 02:00:00 AM 17.6566
11/2/2017 04:00:00 AM 17.4234
11/2/2017 06:00:00 AM 17.6084
11/2/2017 08:00:00 AM 17.5954
...
I would like to the temperatures as a color gradient in the background of another ggplot2 plot showing growth rates over the same time period to look for correlations between temperature and growth rate the two variables. A similar issue was raised here: Plot background colour in gradient, but I haven't figured out how to use continuous variables to code for the gradient.
Thank you very much