Hi, I've been looking for solutions for a simple change I would like to do and I failed. Maybe you can help:
I would like to change labels background in my geom_line.
I can use my variable as factor like that:
geom_label(aes(label = scales::number(A2TB_mean, accuracy = 0.1), fill = factor(A2TB_mean)), color = 'white', show.legend = FALSE) +
but I don't know how to modify colour in this function (for example into red-amber-green scale where red is the lowest and green is the highest number). Currently, colours are random.
I even have issues with selecting my own colour as, despite selecting my own colour, my plot displays its default colour in the plot. In this example the colour is orange rather than "blue" I have specified:
geom_label(aes(label = scales::number(A2TB_mean, accuracy = 0.1), fill="blue"), color = 'white', show.legend = FALSE) +
It must be something easy but all examples I have found are really basic and do not go into such detail of geom_label's sub-function.
Can you help giving solutions for option with the factor and option with my own colour?
Thank you in advance.