I would like to change the error bars colors to match the graph colors without changing the markerstrokecolor. If I set markerstrokecolor=:auto, also the markers’ border change. I would like the latter to remain black.
Without setting markerstrokecolor=:auto
Setting markerstrokecolor=:auto
Replot the markers on top.
For example:
using Plots
y1, y2 = rand(9), rand(9)
dy1, dy2 = 0.2rand(9), 0.2rand(9)
plot(y1, yerror=dy1, m=:square, lc=:reds, mc=:reds, msc=:reds)
plot!(y2, yerror=dy2, m=:square, lc=:blues, mc=:blues, msc=:blues)
scatter!(y1, m=:square, mc=:reds, label=false)
scatter!(y2, m=:square, mc=:blues, label=false)
Thanks for your help. This works perfectly!