Fade to transparent

I have this plot. I want it to fade from opaque to transparent from x=0 to x=100. Is that possible?

fig = Figure()
Axis(fig[1,1])
let xs = 0:.1:100
    ys1 = randn(length(xs))
    ys2 = randn(length(xs))
    yups = max.(ys1, ys2) .+ 5.
    ydns = min.(ys1, ys2)    
    band!(xs, yups.-1, ydns.+1, color=xs, alpha=_)
end
fig
using ColorSchemes
cbarPal = :viridis
cmap = get(colorschemes[cbarPal], LinRange(0,1,100))
cmap2 = [(cmap[i],1/(i/30)) for i in 1:100]; 
# you need to play around with the decay in transparency, but in principle you can do it. 

fig = Figure()
Axis(fig[1,1])
let xs = 0:.1:100
    ys1 = randn(length(xs))
    ys2 = randn(length(xs))
    yups = max.(ys1, ys2) .+ 5.
    ydns = min.(ys1, ys2)    
    band!(xs, yups.-1, ydns.+1, color = xs, colormap = cmap2)
end
fig

2 Likes