Closed robjhyndman closed 5 years ago
Interesting, first time I've noticed a use for inherit.aes
for geoms.
Issue is that autolayer()
is inheriting the colour aesthetic from autoplot()
, requiring .model
(and .rep
).
When the autolayer()
data has more than one key, it will overwrite the colour so nothing will be inherited from the autoplot()
, allowing it to work.
Generally speaking, I think autoplot()
for simulated values is a bad idea, as a better plot can be obtained by more carefully specifying the colour. Having a different colour for each replication is probably unnecessary.
The two plots should both work as the data sets passed to autolayer have the required information. For some reason the non-existence of .model in the autolayer object causes a problem in the first one but not the second.
Created on 2019-10-16 by the reprex package (v0.3.0)