Skip to content

Commit 64b93a1

Browse files
author
Timoté Vaucher
committed
Move opacity to trace_patch
1 parent dc1cd28 commit 64b93a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/python/plotly/plotly/express/_chart_types.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,9 @@ def density_mapbox(
10891089
the color of the region around the corresponding point on the map
10901090
"""
10911091
return make_figure(
1092-
args=locals(), constructor=go.Densitymapbox, trace_patch=dict(radius=radius)
1092+
args=locals(),
1093+
constructor=go.Densitymapbox,
1094+
trace_patch=dict(radius=radius, opacity=opacity),
10931095
)
10941096

10951097

packages/python/plotly/plotly/express/_core.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1278,9 +1278,7 @@ def infer_config(args, constructor, trace_patch):
12781278
if args["opacity"] is None:
12791279
if "barmode" in args and args["barmode"] == "overlay":
12801280
trace_patch["marker"] = dict(opacity=0.5)
1281-
elif constructor == go.Densitymapbox:
1282-
trace_patch["opacity"] = args["opacity"]
1283-
else:
1281+
elif constructor != go.Densitymapbox:
12841282
trace_patch["marker"] = dict(opacity=args["opacity"])
12851283
if "line_group" in args:
12861284
trace_patch["mode"] = "lines" + ("+markers+text" if args["text"] else "")

0 commit comments

Comments
 (0)