Plots: Ribbons along y-axis

Hi there,

I am currently trying to plot my data with a standard deviation. However, due to context reasons, I have a function f(y) instead of f(x). I would now like to make the error look nice with the help of the ribbon attribute. However, the ribbon attribute seems to create the ribbon thickness based on the x-axis. i.e the ribbon seems to be only fit to display a y-error.

For example: I have the following code:

ydata = [1:10;];
xdata = ydata.^2
xerr=rand(Float64, 10)*10
plot(xdata, ydata, xerr=xerr)

which produces the following plot


What I would like to have is something like this

where the error is represented by a somewhat transparent ribbon. However, instead if the yerror, I would like the xerror to be represented by a ribbon

Is there some way of displaying a x-error using the ribbon attribute of plots?

Thank you in advance!

Try this:

using Plots
y = 1:10
x = y.^2
xerr = 10 * rand(Float64, 10)
xs, ys = [x - xerr; reverse(x + xerr)], [y; reverse(y)]
plot(xs, ys, st=:shape, fc=:blues, lw=0, label=false)
plot!(x, y, xerr=xerr)

Thank you so much this is a great answer!