Skip to content

Commit c24b05c

Browse files
committed
Remove redundant color_discrete_sequence check in apply_default_cascade
- Remove redundant check that was setting color_discrete_sequence to None - The check is unnecessary since we only assign trace_specific_colors when any() is True - Fallback logic to layout.colorway and qualitative.D3 remains intact
1 parent 675c668 commit c24b05c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

plotly/express/_core.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,6 @@ def apply_default_cascade(args, constructor):
10561056
# If template contains at least one color for this trace type, assign to color_discrete_sequence
10571057
if any(trace_specific_colors):
10581058
args["color_discrete_sequence"] = trace_specific_colors
1059-
1060-
if not args["color_discrete_sequence"] or not any(
1061-
args["color_discrete_sequence"]
1062-
):
1063-
args["color_discrete_sequence"] = None
10641059
# fallback to layout.colorway if trace-specific colors not available
10651060
if args["color_discrete_sequence"] is None and args["template"].layout.colorway:
10661061
args["color_discrete_sequence"] = args["template"].layout.colorway

0 commit comments

Comments
 (0)