✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Choropleth opacity lines

Hi!

I have a question regarding choropleth maps. I have data in a rectangular longitude-latitude grid and want to display them with ~30% opacity. My code looks like this:

fig = go.Figure(go.Choroplethmapbox(geojson=geojson, locations=ids, z=data,
                                    colorscale="Viridis", zmin=0, zmax=1,
                                    marker_opacity=0.3, marker_line_width=0))

and the resulting plot like this:

The “bins” have the correct opacity but sadly there are lines between the bins with 100% opacity. I turned off the marker line which is usually drawn between the bins by setting its width to zero. For me, it seems that for some reason the opacity setting only affects the filled area but not the borders. Is there a way to fix that?

I’m looking for setting different opacity for the line and the shape too, you found a solution yet ?