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):
364
364
the title of an axis, combine the keys with a period
365
365
e.g. `xaxis.title`. To set a value of an element in an array,
366
366
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.
367
369
368
370
See all of the layout attributes in our reference documentation
369
371
https://plot.ly/python/reference/#Layout
@@ -393,6 +395,11 @@ def relayout(self, layout):
393
395
```
394
396
graph.relayout({'xaxis.range[0]': -3})
395
397
```
398
+
399
+ Example 4 - Replace the entire xaxis object
400
+ ```
401
+ graph.relayout({'xaxis': {'title': 'Experimental results'}})
402
+ ```
396
403
"""
397
404
# TODO: Add flat layout to graph_objs
398
405
message = {
You can’t perform that action at this time.
0 commit comments