I would like to create this color scale for my heatmap:
[0-49] -> dark green
[50-99] -> green
[100-149] -> light green
[150-199] -> yellow
[200-299] -> orange
[300-…] -> red
Here is a sample of my dataset:
I've already tried the code below but it doesn't work:
colfunc <-colorRampPalette(c("darkgreen", "lightgreen", "yellow", "orange", "red"))
ggplot(DATASET, aes(x = BUS_NR, y = MONTH_NR, fill = factor(ALERT_NB)) +
geom_tile() +
scale_fill_manual(values = colfunc(300))