File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
tests/test_optional/test_px Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1053,9 +1053,9 @@ def apply_default_cascade(args, constructor):
10531053 if hasattr (trace_data , "marker" )
10541054 and hasattr (trace_data .marker , "color" )
10551055 ]
1056- # If template contains at least one color for this trace type, assign to color_discrete_sequence
1057- if any (trace_specific_colors ):
1058- args ["color_discrete_sequence" ] = trace_specific_colors
1056+ # If template contains at least one color for this trace type, assign to color_discrete_sequence
1057+ if any (trace_specific_colors ):
1058+ args ["color_discrete_sequence" ] = trace_specific_colors
10591059 # fallback to layout.colorway if trace-specific colors not available
10601060 if args ["color_discrete_sequence" ] is None and args ["template" ].layout .colorway :
10611061 args ["color_discrete_sequence" ] = args ["template" ].layout .colorway
Original file line number Diff line number Diff line change 11from itertools import permutations
22import warnings
33
4+ import pandas as pd
45import plotly .express as px
56import plotly .io as pio
67import narwhals .stable .v1 as nw
@@ -227,8 +228,6 @@ def test_px_templates(backend):
227228
228229
229230def test_px_templates_trace_specific_colors (backend ):
230- import pandas as pd
231-
232231 tips = px .data .tips (return_type = backend )
233232
234233 # trace-specific colors: each trace type uses its own template colors
You can’t perform that action at this time.
0 commit comments