# Ribbon opacity when plotting multiple line in Plots.jl

**URL:** <https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [April 9, 2026, 12:22pm UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643 "2026-04-09T12:22:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![silveedee](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@silveedee](https://discourse.julialang.org/u/silveedee)\
**Post date:** [April 9, 2026, 12:22pm UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643/1 "2026-04-09T12:22:58Z")

</div>

I have some lines I’m plotting that I want to add error bars too. Here’s an approximation of my data, and my first attempt to plot these lines with error bars

```julia-auto
s = 1:10:101 
r = 0.0:0.1:1 

rand_error=rand(5:10,(11,11))
N=20

rev = zeros(length(s), length(r))

for ps in 1:length(s)
    for pr in 1:length(r)
        A = 1 - ((N-1)/N)^s[ps]
        frac = (A*r[pr] - A) / (A*r[pr] - A - r[pr])
        rev[ps, pr] = 0.8*(frac*133 + (1 - frac)*100) + 20
    end

end
rev_2=permutedims(rev)

p1 = Plots.plot(r, rev_2, yerr=rand_error, msc=:auto, linewidth=2,label=permutedims(s), xlabel="R", ylabel="Mean value", legend= :outerright,palette=palette(:viridis,11,rev=true),legendtitle="s=")

```

Now, I didn’t really like how that looked, so I tried it with a ribbon:

```julia-auto
p1 = Plots.plot(r, rev_2, ribbon=rand_error, linewidth=2,label=permutedims(s), xlabel="R", ylabel="Mean value", legend= :outerright,palette=palette(:viridis,11,rev=true),legendtitle="s=")

```

But this hides most of my lines! Is there any way to control the opacity of a ribbon like in R? Is this possible with Plots? Or only with some other package? Any tips would be appreciated!

 ![errors_ribbon](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2fa84cd23ee2e69a0443101332503045297235d.svg)

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [April 9, 2026, 12:49pm UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643/2 "2026-04-09T12:49:04Z")

</div>

Hello and welcome to the community 👋

Try `fillalpha = 0.1`, like this

```julia-auto
p1 = Plots.plot(r, rev_2, ribbon=rand_error, linewidth=2,label=permutedims(s), xlabel="R", ylabel="Mean value", legend= :outerright,palette=palette(:viridis,11,rev=true),legendtitle="s=")

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/1/11d141a64bf48c866d0f3650463b3567cc80cf7b.png)

---

<div class="post-metadata">

**Author:** ![silveedee](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@silveedee](https://discourse.julialang.org/u/silveedee)\
**Post date:** [April 13, 2026, 8:34am UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643/3 "2026-04-13T08:34:20Z")

</div>

That worked perfectly!  
I guess it would be useful if the Plots documentation pointed towards these kinds of options from the Ribbon page, but even knowing that I can first search through Attributes is very helpful.

---

<div class="post-metadata">

**Author:** ![Boris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/boris/32/3306_2.png) [@Boris](https://discourse.julialang.org/u/Boris)\
**Post date:** [April 13, 2026, 9:14am UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643/4 "2026-04-13T09:14:44Z")

</div>

It is in the Plots documetation, that’s exactly where I found it (even though, coming from matlab I expected already the `alpha` keyword.

> **[Series Attributes · Plots](https://docs.juliaplots.org/dev/generated/attributes_series/)**
>
> Documentation for Plots.

Edit: you mean to actually have a sentence here that you can change color, opacity, and other attributes of the ribbon? [Ribbons · Plots](https://docs.juliaplots.org/dev/gallery/gr/generated/gr-ref037/)

---

<div class="post-metadata">

**Author:** ![silveedee](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@silveedee](https://discourse.julialang.org/u/silveedee)\
**Post date:** [April 13, 2026, 1:18pm UTC](https://discourse.julialang.org/t/ribbon-opacity-when-plotting-multiple-line-in-plots-jl/136643/5 "2026-04-13T13:18:34Z")

</div>

Yes, I know now to look in Series Attributes, but when I didn’t see any options listed under Ribbons, I came straight here. Perhaps additional cross-referencing would help others, but it is only an idea.  
Thanks again!
