I'm having trouble getting a custom color gradient to work. I want to assign certain colors to certain values but have the colors flow. This is what I've got so far.
thi_color_scale<-scale_color_gradientn(
colors = c("#660000", "#cc0000", "#e69f00", "#9a9a9a"),
values = c(0, 2.9, #critically low
3, 5, #low
5, 8, #int
8, max(data$avg_total_egg_thi)))#high
iso_egg_plot_thi_conc<- ggplot(data = data, aes(x = d13c_lc, y = d15n, shape = egg_thi_status, color = avg_total_egg_thi)) +
geom_point(size = 1.75, stroke = 1) +
# Use the custom color gradient scale
thi_color_scale
iso_egg_plot_thi_conc
I've tried finding the middle value of each of these ranges for the colors and just setting those as the number assigned to the color but that just spits out a grey plot.