✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Plotly python fill - control opacity of filled area?

Is there a way to control how opaque the filled area between y is between two traces? I have tried adjusting opacity in the trace attributes as well as marker attributes and neither works. Default via the reference (https://plot.ly/python/reference/#scatter-fill) is half transparent of whatever color the marker is set to. So I can only get it to be fully opaque (if I manually set the color of the fill with ‘fillcolor=’) or half opaque if I do nothing.

Specify an alpha value via fillcolor, like so:
fillcolor=‘rgba(255, 0, 0, 0.1)’,

This would be a fairly transparent red.

2 Likes

Nice - did not think of that. Does the trick. Thanks.

1 Like