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: CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
20
20
### Changed
21
21
- Improved data validation covering the full API with clear, informative error messages. This means that incorrect properties and/or values now always raise a `ValueError` with a description of the error, the invalid property, and the available properties on the level that it was placed in the graph object. Eg. `go.Scatter(foo=123)` raises a validation error. See https://plot.ly/python/reference/ for a reference to all valid properties and values in the Python API.
22
22
23
-
- Graph objs are no longer dicts, though they still provide many dict-like magic methods. Running a cell of a graph object now prints a dict-style representation of the object:
23
+
- Graph objects are no longer dicts, though they still provide many dict-like magic methods. Running a cell of a graph object now prints a dict-style representation of the object:
plotly figures and graph objects now include the dict-like `__repr__` method that represents the object as a string
30
+
## New Plotly Object Representation
31
+
Plotly figures and graph objects have an updated `__repr__` method that displays objects in a pretty printed form that can be copied, pasted, and evaluated to recreate the object.
- Assignment to the `Figure.data` property must contain a permutation of a subset of the existing traces. Assignment can be used to reorder and remove traces, but cannot currently add new traces.
44
+
45
+
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.
32
46
33
47
```
34
-
f.__repr__()
48
+
fig.data = [fig.data[2], fig.data[0]]
35
49
```
36
50
51
+
However this is not valid:
52
+
```
53
+
fig.data = [fig.data[0], go.Scatter(y=[2, 3, 1])]
54
+
```
55
+
56
+
It's not valid because it's introducing a new trace during assignment. This trace would need to be added using `add_trace` instead.
57
+
58
+
37
59
## 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.
60
+
Let's create a subplot then turn it into a FigureWidget to display in the notebook. Note that `append_trace` is now deprecated. Use `add_trace` or `add_traces` instead.
39
61
40
62
```
41
63
import plotly
@@ -56,7 +78,7 @@ f2.layout.title = 'Age against variables relating to diabetes'
56
78
f2
57
79
```
58
80
59
-
## What doesn't work anymore
81
+
## Breaking Changes
60
82
Run the following examples to see what is now deprecated or not valid:
61
83
62
84
- Data array properties may not be specified as scalars:
@@ -65,7 +87,7 @@ import plotly.graph_objs as go
65
87
go.Bar(x=1)
66
88
```
67
89
68
-
-Undocumented properties are no longer available. These include: `.to_string`, `.strip_style`, `.get_data`, `.validate` and `.to_dataframe`.
90
+
-Several undocumented `Figure` methods have been removed. These include: `.to_string`, `.strip_style`, `.get_data`, `.validate` and `.to_dataframe`.
69
91
70
92
- 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