Closed
Description
Updating a layout with new title text behaves differently whether you use the modern nested title->text form or the old-but-still-supported form of title as a string.
>>> go.Layout(title=dict(font_color="red")).update(title=dict(text="hi"))
Layout({
'title': {'font': {'color': 'red'}, 'text': 'hi'}
})
>>> go.Layout(title=dict(font_color="red")).update(title="hi")
Layout({
'title': {'text': 'hi'}
})Notice how the first one (using title->text) performs a deep merge, so existing title styling is preserved. The second form wipes out the title object, replacing it with just the new string and removing the styling. Ideally both of these should perform a deep merge.
I've seen this issue with other titles too, such as xaxis->title
Metadata
Metadata
Assignees
Labels
No labels

