How to set line color in errorline

Hi everyone,

I’m trying to set the line color in the errorline function from the StatsPlots package. However, I’ve noticed that I can only change the marker color and not the line color. Does anyone know how to set the line color in the errorline function?

Thank you!

x = 1:10
y = fill(NaN, 10, 100, 3)
for i = axes(y,3)
    y[:, :, i] = collect(1:2:20) .+ rand(10,100).*5 .* collect(1:2:20) .+ rand()*100
end

errorline(x, y[:, :, 1], errorstyle=:ribbon, label="Ribbon")
errorline!(x, y[:, :, 2], errorstyle=:stick, label="Stick", secondarycolor=:matched)
errorline!(x, y[:, :, 3], errorstyle=:plume, label="Plume")

Hi, have you tried using the groupcolor keyword argument?
For example:

errorline(x, 2*y[:, :, 1], errorstyle=:ribbon, label="Ribbon", groupcolor=:red, secondarycolor=:pink)
errorline!(x, 1.3*y[:, :, 2], errorstyle=:stick, label="Stick", groupcolor=:blue, secondarycolor=:cyan)
errorline!(x, y[:, :, 3], errorstyle=:plume, label="Plume", groupcolor=:green, secondarycolor=:lime)
1 Like

Thanks for your help! It works now!