@@ -551,9 +551,9 @@ def configure_cartesian_axes(args, fig, orders):
551
551
def configure_ternary_axes (args , fig , orders ):
552
552
fig .update_layout (
553
553
ternary = dict (
554
- aaxis = dict (title = get_label (args , args ["a" ])),
555
- baxis = dict (title = get_label (args , args ["b" ])),
556
- caxis = dict (title = get_label (args , args ["c" ])),
554
+ aaxis = dict (title_text = get_label (args , args ["a" ])),
555
+ baxis = dict (title_text = get_label (args , args ["b" ])),
556
+ caxis = dict (title_text = get_label (args , args ["c" ])),
557
557
)
558
558
)
559
559
@@ -588,9 +588,9 @@ def configure_polar_axes(args, fig, orders):
588
588
def configure_3d_axes (args , fig , orders ):
589
589
layout = dict (
590
590
scene = dict (
591
- xaxis = dict (title = get_label (args , args ["x" ])),
592
- yaxis = dict (title = get_label (args , args ["y" ])),
593
- zaxis = dict (title = get_label (args , args ["z" ])),
591
+ xaxis = dict (title_text = get_label (args , args ["x" ])),
592
+ yaxis = dict (title_text = get_label (args , args ["y" ])),
593
+ zaxis = dict (title_text = get_label (args , args ["z" ])),
594
594
)
595
595
)
596
596
@@ -1611,15 +1611,19 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
1611
1611
cmid = args ["color_continuous_midpoint" ],
1612
1612
cmin = range_color [0 ],
1613
1613
cmax = range_color [1 ],
1614
- colorbar = dict (title = get_decorated_label (args , args [colorvar ], colorvar )),
1614
+ colorbar = dict (
1615
+ title_text = get_decorated_label (args , args [colorvar ], colorvar )
1616
+ ),
1615
1617
)
1616
- for v in ["title" , " height" , "width" ]:
1618
+ for v in ["height" , "width" ]:
1617
1619
if args [v ]:
1618
1620
layout_patch [v ] = args [v ]
1619
1621
layout_patch ["legend" ] = dict (tracegroupgap = 0 )
1620
1622
if trace_name_labels :
1621
- layout_patch ["legend" ]["title" ] = ", " .join (trace_name_labels )
1622
- if "title" not in layout_patch and args ["template" ].layout .margin .t is None :
1623
+ layout_patch ["legend" ]["title_text" ] = ", " .join (trace_name_labels )
1624
+ if args ["title" ]:
1625
+ layout_patch ["title_text" ] = args ["title" ]
1626
+ elif args ["template" ].layout .margin .t is None :
1623
1627
layout_patch ["margin" ] = {"t" : 60 }
1624
1628
if (
1625
1629
"size" in args
@@ -1649,7 +1653,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
1649
1653
1650
1654
# Add traces, layout and frames to figure
1651
1655
fig .add_traces (frame_list [0 ]["data" ] if len (frame_list ) > 0 else [])
1652
- fig .layout . update (layout_patch )
1656
+ fig .update_layout (layout_patch )
1653
1657
if "template" in args and args ["template" ] is not None :
1654
1658
fig .update_layout (template = args ["template" ], overwrite = True )
1655
1659
fig .frames = frame_list if len (frames ) > 1 else []
0 commit comments