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: migration-guide.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
+
# Migration to Version 5
2
+
See https://community.plotly.com/t/introducing-plotly-py-5-0-0-a-new-federated-jupyter-extension-icicle-charts-and-bar-chart-patterns/54039
3
+
1
4
# Migration to Version 4
2
-
See https://plot.ly/python/next/v4-migration/
5
+
See https://plotly.com/python/v4-migration/
3
6
4
7
# Migration to Version 3
5
8
There are many new and great features in plotly.py 3.0 including deeper Jupyter integration, deeper figure validation, improved performance, and more. This guide contains a summary of the breaking changes that you need to be aware of when migrating code from version 2 to version 3.
@@ -50,7 +53,7 @@ FigureWidget({
50
53
```
51
54
52
55
## New add trace methods that handle subplots
53
-
The legacy `append_trace` method for adding traces to subplots has been deprecated in favor of the new `add_trace`, `add_traces`, and `add_*` methods. Each of these new methods accepts optional row/column information that may be used to add traces to subplots for figures initialized by the `plotly.tools.make_subplots` function.
56
+
The legacy `append_trace` method for adding traces to subplots has been deprecated in favor of the new `add_trace`, `add_traces`, and `add_*` methods. Each of these new methods accepts optional row/column information that may be used to add traces to subplots for figures initialized by the `plotly.tools.make_subplots` function.
54
57
55
58
Let's create a subplot then turn it into a FigureWidget to display in the notebook.
56
59
@@ -169,7 +172,7 @@ layout = go.Layout(
169
172
```
170
173
171
174
### New Figure.data Assignment
172
-
There are new restriction on the assignment of traces to the `data` property of a figure. The assigned value must be a list or a tuple of a subset of the traces already present in the figure. Assignment to `data` may be used to reorder and remove existing traces, but it may not currently be used to add new traces. New traces must be added using the `add_trace`, `add_traces`, or `add_*` methods.
175
+
There are new restriction on the assignment of traces to the `data` property of a figure. The assigned value must be a list or a tuple of a subset of the traces already present in the figure. Assignment to `data` may be used to reorder and remove existing traces, but it may not currently be used to add new traces. New traces must be added using the `add_trace`, `add_traces`, or `add_*` methods.
173
176
174
177
For example, suppose a figure, `fig`, has 3 traces. The following command is valid and it will move the third trace to be the first, the first trace to be the second, and it will remove the second trace.
175
178
@@ -191,7 +194,7 @@ import plotly.graph_objs as go
0 commit comments