I am trying to layer plots in ggplot2 using a for loop. Ultimately, I want to use custom geom_function for this, but to simplify the example I for
ggplot2
geom_function