I want to use the colour brewer to set the scale of my plot. However, I would prefer to reverse the order of scale so that the lighter colour represents a cold(er) day and the darker colour would represent a hotter day.
library(tidyverse)
library(ryouwithme)
library(RColorBrewer)
rain_temp_bugs %>% # data set from RYouWithMe package
na.omit() %>%
filter(beachbugs > 500) %>%
ggplot(
aes(
x = rain_mm,
y = beachbugs,
colour = temp_airport
)
) +
geom_point() +
geom_smooth() +
scale_color_distiller(palette = "YlOrBr")
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'