# calculate percentiles across time
th.pn <- pn(sims = th.mcmc)
# set up plot area
plot(NULL, type = "n", xlim = c(0, 945), ylim = range(th.pn), ylab = "Theta")
# plot different colours and patterns of shading
fan.fill(th.pn[, "10%"], th.pn[, "90%"])
fan.fill(th.pn[, "10%"] + 1, th.pn[, "90%"] + 2, "red")
fan.fill(th.pn[, "10%"] + 0, th.pn[, "90%"] - 1, adjustcolor("red", 0.2))
fan.fill(th.pn[, "10%"] - 2, th.pn[, "90%"] - 1, angle = 45, density = 10)
Run the code above in your browser using DataLab