Skip to content

Commit 19a2091

Browse files
Merge pull request #2317 from tvaucher/densitymapbox_opacity
Opacity in px.density_mapbox
2 parents d0b8f9f + fe0b1ed commit 19a2091

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,7 @@ def pie(
12341234
template=None,
12351235
width=None,
12361236
height=None,
1237+
opacity=None,
12371238
hole=None,
12381239
):
12391240
"""
@@ -1398,9 +1399,7 @@ def funnel(
13981399
rectangular sector of a funnel.
13991400
"""
14001401
return make_figure(
1401-
args=locals(),
1402-
constructor=go.Funnel,
1403-
trace_patch=dict(opacity=opacity, orientation=orientation),
1402+
args=locals(), constructor=go.Funnel, trace_patch=dict(orientation=orientation),
14041403
)
14051404

14061405

@@ -1422,6 +1421,7 @@ def funnel_area(
14221421
template=None,
14231422
width=None,
14241423
height=None,
1424+
opacity=None,
14251425
):
14261426
"""
14271427
In a funnel area plot, each row of `data_frame` is represented as a

Diff for: packages/python/plotly/plotly/express/_core.py

+2
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,8 @@ def infer_config(args, constructor, trace_patch):
12791279
if args["opacity"] is None:
12801280
if "barmode" in args and args["barmode"] == "overlay":
12811281
trace_patch["marker"] = dict(opacity=0.5)
1282+
elif constructor in [go.Densitymapbox, go.Pie, go.Funnel, go.Funnelarea]:
1283+
trace_patch["opacity"] = args["opacity"]
12821284
else:
12831285
trace_patch["marker"] = dict(opacity=args["opacity"])
12841286
if "line_group" in args:

0 commit comments

Comments
 (0)