@@ -2478,6 +2478,13 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
2478
2478
constructor = go .Bar
2479
2479
args = process_dataframe_timeline (args )
2480
2480
2481
+ # With marginal histogram, if barmode is not set, set to "overlay"
2482
+ if (
2483
+ "histogram" in [args .get ("marginal_x" ), args .get ("marginal_y" )]
2484
+ and "barmode" not in args
2485
+ ):
2486
+ layout_patch ["barmode" ] = "overlay"
2487
+
2481
2488
trace_specs , grouped_mappings , sizeref , show_colorbar = infer_config (
2482
2489
args , constructor , trace_patch , layout_patch
2483
2490
)
@@ -2550,13 +2557,6 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
2550
2557
showlegend = (trace_name != "" and trace_name not in trace_names ),
2551
2558
)
2552
2559
2553
- # With marginal histogram, if barmode is not set, set to "overlay"
2554
- if (
2555
- "histogram" in [args .get ("marginal_x" ), args .get ("marginal_y" )]
2556
- and "barmode" not in args
2557
- ):
2558
- layout_patch ["barmode" ] = "overlay"
2559
-
2560
2560
# Set 'offsetgroup' only in group barmode (or if no barmode is set)
2561
2561
barmode = args .get ("barmode" ) or layout_patch .get ("barmode" )
2562
2562
if trace_spec .constructor in [go .Bar , go .Box , go .Violin , go .Histogram ] and (
0 commit comments