You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a follow-up to #5702.
Instead of throwing errors, I think we should throw a warning and remove the offending element from the theme.
library(ggplot2)
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
theme(foobar="qux")
#> Error in `plot_theme()` at ggplot2/R/plot-build.R:178:3:#> ! The `foobar` theme element is not defined in the element hierarchy.