I have a sequence of normally distributed posterior densities from Bayesian updating beliefs about a parameter in a model. Suppose the sequences of means and standard deviations of the posteriors are,
mean <- c(5,4,3,2,1)
sd <- c(7,6,5,4,3)
Where the distribution N(5,7) is the first posterior, N(4,6) is the second posterior and so on. I wanted to plot them as a sequence of densities so the axes are rotated (support of the distribution goes from the bottom to the top) and such that the densities are all in order from left to right. I understand how to plot the densities using stat_function, and how to put plots in facets with facet_grid, but I'm struggling to combine it all together.