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
+50-8
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,65 @@ import plotly
10
10
import plotly.graph_objs as go
11
11
12
12
f = go.FigureWidget()
13
-
f.add_scatter(x=[1, 2, 3], y=[4, 3, 5])
13
+
```
14
+
15
+
## Tab Completion
16
+
Entering ``f.add_<tab>`` displays add methods for all of the supported trace types. Try it!
17
+
```
18
+
f.add_
19
+
```
20
+
21
+
Entering `f.add_scatter(<tab>)` displays the names of all of the top-level properties for the scatter trace type
22
+
23
+
Entering `f.add_scatter(<shift+tab>)` displays the signature pop-up. Expanding this pop-up reveals the method doc string which contains the descriptions of all of the top level properties. Let's finish add a scatter trace to `f`:
24
+
25
+
```
26
+
f.add_scatter(x=[1,2,3], y=[4,3,2])
14
27
f
15
28
```
16
29
17
-
##
30
+
## New __repr__ method
31
+
plotly figures and graph objects now include the dict-like `__repr__` method that represents the object as a string
32
+
33
+
```
34
+
f.__repr__()
35
+
```
18
36
37
+
## FigureWidget Subplot Example
38
+
Let's create a subplot then turn it into a FigureWidget to display in the notebook. Note that `append_trace` is no deprecated. Use `add_trace` or `add_traces` instead.
19
39
20
-
#### Tab completion
21
-
Entering ``f1.add_<tab>`` displays add methods for all of the supported trace types
f2.layout.title = 'Age against variables relating to diabetes'
56
+
f2
57
+
```
58
+
59
+
## What doesn't work anymore
60
+
Run the following examples to see what is now deprecated or not valid:
61
+
62
+
- Data array properties may not be specified as scalars:
63
+
```
64
+
import plotly.graph_objs as go
65
+
go.Bar(x=1)
24
66
```
25
67
26
-
Entering ``f1.add_scatter(<tab>)`` displays the names of all of the top-level properties for the scatter trace type
68
+
- Undocumented properties are no longer available. These include: `.to_string`, `.strip_style`, `.get_data`, `.validate` and `.to_dataframe`.
27
69
28
-
Entering ``f1.add_scatter(<shift+tab>)`` displays the signature pop-up. Expanding this pop-up reveals the method doc string which contains the descriptions of all of the top level properties
70
+
- Object arrays such as `Figure.data` and `Layout.images` are now represented as tuples of graph objects, not lists. Run the following as a sanity check:
0 commit comments