Home > OS >  What is Error: Aesthetics must be valid data columns Problematic aesthetic(s) in geom_rect and how t
What is Error: Aesthetics must be valid data columns Problematic aesthetic(s) in geom_rect and how t

Time:09-18

I would like to make shade on certain date each year in time-series plot that is similar to this: enter image description here

CodePudding user response:

In my opinion the error you are getting is beacuse geom_rect() is trying to find columns (Date in this case) in previously declared aes().

I couldn't test my theory since there are some problems with your code (e.g. no coeff in df1 object).

  • Related