 <p>Without data/reproducible example is difficult to help you. But you can try something like:</p> <pre><code>ggplot(movies, aes(x = year, y = rating)) + stat_summary(geom="ribbon", fun.ymin = function(x) quantile(x, 0.05), fun.ymax = function(x) quantile(x, 0.95)) + stat_summary(geom="line", fun.y=median) </code></pre> <p>Hope it helps,</p> <p>alex</p>