File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,8 @@ def relayout(self, layout):
364364 the title of an axis, combine the keys with a period
365365 e.g. `xaxis.title`. To set a value of an element in an array,
366366 like an axis's range, use brackets, e.g. 'xaxis.range[0]'.
367+ To replace an entire nested object, just specify the value to
368+ the sub-object. See example 4 below.
367369
368370 See all of the layout attributes in our reference documentation
369371 https://plot.ly/python/reference/#Layout
@@ -393,6 +395,11 @@ def relayout(self, layout):
393395 ```
394396 graph.relayout({'xaxis.range[0]': -3})
395397 ```
398+
399+ Example 4 - Replace the entire xaxis object
400+ ```
401+ graph.relayout({'xaxis': {'title': 'Experimental results'}})
402+ ```
396403 """
397404 # TODO: Add flat layout to graph_objs
398405 message = {
You can’t perform that action at this time.
0 commit comments