@@ -551,9 +551,9 @@ def configure_cartesian_axes(args, fig, orders):
551551def configure_ternary_axes (args , fig , orders ):
552552 fig .update_layout (
553553 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" ])),
557557 )
558558 )
559559
@@ -588,9 +588,9 @@ def configure_polar_axes(args, fig, orders):
588588def configure_3d_axes (args , fig , orders ):
589589 layout = dict (
590590 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" ])),
594594 )
595595 )
596596
@@ -1611,15 +1611,19 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
16111611 cmid = args ["color_continuous_midpoint" ],
16121612 cmin = range_color [0 ],
16131613 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+ ),
16151617 )
1616- for v in ["title" , " height" , "width" ]:
1618+ for v in ["height" , "width" ]:
16171619 if args [v ]:
16181620 layout_patch [v ] = args [v ]
16191621 layout_patch ["legend" ] = dict (tracegroupgap = 0 )
16201622 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 :
16231627 layout_patch ["margin" ] = {"t" : 60 }
16241628 if (
16251629 "size" in args
@@ -1649,7 +1653,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
16491653
16501654 # Add traces, layout and frames to figure
16511655 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 )
16531657 if "template" in args and args ["template" ] is not None :
16541658 fig .update_layout (template = args ["template" ], overwrite = True )
16551659 fig .frames = frame_list if len (frames ) > 1 else []
0 commit comments