From 6f30795f79fe1cf504bc605edc53bfc81c503adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timot=C3=A9=20Vaucher?= Date: Thu, 26 Mar 2020 22:37:49 +0100 Subject: [PATCH 1/3] Revert #2294 --- packages/python/plotly/plotly/express/_chart_types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/python/plotly/plotly/express/_chart_types.py b/packages/python/plotly/plotly/express/_chart_types.py index 2466595c31c..ec3e7a3ec22 100644 --- a/packages/python/plotly/plotly/express/_chart_types.py +++ b/packages/python/plotly/plotly/express/_chart_types.py @@ -1234,6 +1234,7 @@ def pie( template=None, width=None, height=None, + opacity=None, hole=None, ): """ @@ -1422,6 +1423,7 @@ def funnel_area( template=None, width=None, height=None, + opacity=None, ): """ In a funnel area plot, each row of `data_frame` is represented as a From 2279efdccae7269c148ee62acf0461d36608a1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timot=C3=A9=20Vaucher?= Date: Thu, 26 Mar 2020 22:39:15 +0100 Subject: [PATCH 2/3] Remove opacity from trace_patch --- packages/python/plotly/plotly/express/_chart_types.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/python/plotly/plotly/express/_chart_types.py b/packages/python/plotly/plotly/express/_chart_types.py index ec3e7a3ec22..f7e7da8cbfd 100644 --- a/packages/python/plotly/plotly/express/_chart_types.py +++ b/packages/python/plotly/plotly/express/_chart_types.py @@ -1399,9 +1399,7 @@ def funnel( rectangular sector of a funnel. """ return make_figure( - args=locals(), - constructor=go.Funnel, - trace_patch=dict(opacity=opacity, orientation=orientation), + args=locals(), constructor=go.Funnel, trace_patch=dict(orientation=orientation), ) From fe0b1eddc3814b2c5ef1fe462fe7596f84a62c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timot=C3=A9=20Vaucher?= Date: Thu, 26 Mar 2020 22:40:11 +0100 Subject: [PATCH 3/3] Fix #2316 --- packages/python/plotly/plotly/express/_core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py index de2af43131d..7a28637fee6 100644 --- a/packages/python/plotly/plotly/express/_core.py +++ b/packages/python/plotly/plotly/express/_core.py @@ -1278,6 +1278,8 @@ def infer_config(args, constructor, trace_patch): if args["opacity"] is None: if "barmode" in args and args["barmode"] == "overlay": trace_patch["marker"] = dict(opacity=0.5) + elif constructor in [go.Densitymapbox, go.Pie, go.Funnel, go.Funnelarea]: + trace_patch["opacity"] = args["opacity"] else: trace_patch["marker"] = dict(opacity=args["opacity"]) if "line_group" in args: