In the below example, why does the vline not get coloured blue? I would have thought the colour scale would be inherited by all layers with the col aesthetic.
I understand that I could add a col = "blue" argument to geom_vline, but I am trying to get my head around how colour scales work.
When you provide the xintercept argument, outside of an aes() mapping, geom_vline() behaves like an annotation, not like a mapped geom, so, it ignores any mapping definition. You would need to pass the colour property as an argument, as you would do with an annotation.