You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: notebooks/creating-updating-figures.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -227,26 +227,6 @@ fig.show()
227
227
228
228
Magic underscore notation is supported throughout the graph objects API, and it can often significantly simplify operations involving deeply nested properties.
229
229
230
-
### Property assignment
231
-
Trace and layout properties can be updated using property assignment syntax. Here is an example of setting the figure title using property assignment.
Graph object figures support an `update_layout` method that may be used to update multiple nested properties of a figure's layout. Here is an example of updating the text and font size of a figure's title using `update_layout`.
252
232
@@ -466,7 +446,7 @@ There are also `for_each_xaxis` and `for_each_yaxis` methods that are analogous
466
446
467
447
468
448
### Chaining figure operations
469
-
With the exception of property assignment, all of the figure update operations described in this section are methods that return a reference to the figure being modified. This makes it possible the chain multiple figure modification operations together into a single expression.
449
+
All of the figure update operations described above are methods that return a reference to the figure being modified. This makes it possible the chain multiple figure modification operations together into a single expression.
470
450
471
451
Here is an example of a chained expression that creates a faceted scatter plot with OLS trend lines using plotly express, sets the title font size using `update_layout`, disables vertical grid lines using `update_xaxes`, updates the width and dash pattern of the trend lines using `update_traces`, and then displays the figure using `show`.
472
452
@@ -482,3 +462,23 @@ iris = px.data.iris()
482
462
selector=dict(type="scatter", mode="lines"))
483
463
).show()
484
464
```
465
+
466
+
### Property assignment
467
+
Trace and layout properties can be updated using property assignment syntax. Here is an example of setting the figure title using property assignment.
0 commit comments