A few remaining ggplot2 modernization items I found while working on the other deprecation fixes:
1. overlay_function() wraps stat_function()
overlay_function() in bayesplot-helpers.R is a thin wrapper around ggplot2::stat_function(). Since ggplot2 3.3.0, geom_function() is the recommended replacement. The switch is straightforward since overlay_function() just passes ... through.
2. override.aes = list(size = ...) for line-based legends
R/mcmc-traces.R (line ~722) uses size in override.aes for a linetype legend key, where linewidth is the correct aesthetic since ggplot2 3.4.0.
(The similar case in ppd-distributions.R is already covered by #430.)