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: .github/pull_request_template.md
+1
Original file line number
Diff line number
Diff line change
@@ -33,5 +33,6 @@ below :-).
33
33
- [ ] For a new feature, I have added documentation examples in an existing or
34
34
new tutorial notebook (please see the doc checklist as well).
35
35
- [ ] I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
36
+
- [ ] For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+35
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,36 @@
2
2
All notable changes to this project will be documented in this file.
3
3
This project adheres to [Semantic Versioning](http://semver.org/).
4
4
5
+
## [4.13.0] - UNRELEASED
6
+
7
+
### Added
8
+
9
+
-`go.Figure` now has a `set_subplots` method to set subplots on an already
10
+
existing figure.
11
+
- Added `Turbo` colorscale
12
+
13
+
14
+
## [4.12.1] - UNRELEASED
15
+
16
+
17
+
18
+
## [4.12.0] - 2020-10-23
19
+
20
+
### Added
21
+
22
+
- For `add_trace`, `add_shape`, `add_annotation` and `add_layout_image`, the `row` and/or `col` argument now also accept the string `"all"`. `row="all"` adds the object to all the subplot rows and `col="all"` adds the object to all the subplot columns. ([#2840](https://github.com/plotly/plotly.py/pull/2840))
23
+
- Shapes that reference the plot axes in one dimension and the data in another dimension can be added with the new `add_hline`, `add_vline`, `add_hrect`, `add_vrect` functions, which also support the `row="all"` and `col="all"` arguments. ([#2840](https://github.com/plotly/plotly.py/pull/2840))
24
+
- The `add_trace`, `add_shape`, `add_annotation`, `add_layout_image`, `add_hline`, `add_vline`, `add_hrect`, `add_vrect` functions accept an argument `exclude_empty_subplots` which if `True`, only adds the object to subplots already containing traces or layout objects. This is useful in conjunction with the `row="all"` and `col="all"` arguments. ([#2840](https://github.com/plotly/plotly.py/pull/2840))
25
+
- For all `go.Figure` functions accepting a selector argument (e.g., `select_traces`), this argument can now also be a function which is passed each relevant graph object (in the case of `select_traces`, it is passed every trace in the figure). For graph objects where this function returns true, the graph object is included in the selection. ([#2844](https://github.com/plotly/plotly.py/pull/2844))
26
+
27
+
### Added
28
+
29
+
- Better magic underscore error messages. For example, `some_fig.update_layout(geo_ltaxis_showgrid=True)` shows `Bad property path:\ngeo_ltaxis_showgrid\n ^` and lists the valid properties for `geo`.
30
+
31
+
### Updated
32
+
33
+
- Updated Plotly.js to version 1.57.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.57.1/CHANGELOG.md) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module.
34
+
5
35
## [4.11.0] - 2020-10-01
6
36
7
37
### Updated
@@ -16,6 +46,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
16
46
17
47
### Updated
18
48
49
+
- The JSON serialization of plotly figures had been accelerated by handling
50
+
differently figures with and without NaN and Inf values ([#2880](https://github.com/plotly/plotly.py/pull/2880)).
51
+
52
+
### Updated
53
+
19
54
- Updated Plotly.js to version 1.55.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.55.2/CHANGELOG.md) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module.
20
55
-`px.imshow` has a new `binary_string` boolean argument, which passes the
21
56
image data as a b64 binary string when True. Using binary strings allow for
Copy file name to clipboardExpand all lines: README.md
+10-6
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,13 @@
31
31
</tr>
32
32
</table>
33
33
34
+
## Data Science Workspaces
35
+
36
+
Our recommended IDE for Plotly’s Python graphing library is Dash Enterprise’s [Data Science Workspaces](https://plotly.com/dash/workspaces/), which has both Jupyter notebook and Python code file support.
37
+
34
38
## Quickstart
35
39
36
-
`pip install plotly==4.11.0`
40
+
`pip install plotly==4.12.0`
37
41
38
42
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.2"`):
39
43
@@ -82,13 +86,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
82
86
plotly.py may be installed using pip...
83
87
84
88
```
85
-
pip install plotly==4.11.0
89
+
pip install plotly==4.12.0
86
90
```
87
91
88
92
or conda.
89
93
90
94
```
91
-
conda install -c plotly plotly=4.11.0
95
+
conda install -c plotly plotly=4.12.0
92
96
```
93
97
94
98
### Jupyter Notebook Support
@@ -125,18 +129,18 @@ Then run the following commands to install the required JupyterLab extensions (n
`px.choropleth` accepts the `geometry` of a [GeoPandas](https://geopandas.org/) data frame as the input to `geojson` if the `geometry` contains polygons.
Copy file name to clipboardExpand all lines: doc/python/figure-structure.md
+15-2
Original file line number
Diff line number
Diff line change
@@ -95,18 +95,31 @@ The third of the three top-level attributes of a figure is `frames`, whose value
95
95
96
96
### The `config` Object
97
97
98
-
At [render-time](/python/renderers/), it is also possible to control certain figure behaviors which are not considered part of the figure proper i.e. the behaviour of the "modebar" and how the figure relates to mouse actions like scrolling etc. The object that contains these options is called the [`config`, and has its own documentation page](/python/configuration-options/). It is exposed in Python as the `config` keyword argument of the `.show()` method on `plotly.graph_objects.Figure` objects.
98
+
At [render-time](/python/renderers/), it is also possible to control certain figure behaviors which are not considered part of the figure proper i.e. the behavior of the "modebar" and how the figure relates to mouse actions like scrolling etc. The object that contains these options is called the [`config`, and has its own documentation page](/python/configuration-options/). It is exposed in Python as the `config` keyword argument of the `.show()` method on `plotly.graph_objects.Figure` objects.
99
99
100
-
### Positioning With Paperor Container Coordinates
100
+
### Positioning With Paper, Container Coordinates, or Axis Domain Coordinates
101
101
102
102
Various figure components configured within the layout of the figure support positioning attributes named `x` or `y`, whose values may be specified in "paper coordinates" (sometimes referred to as "plot fractions" or "normalized coordinates"). Examples include `layout.xaxis.domain` or `layout.legend.x` or `layout.annotation[].x`.
103
103
104
104
Positioning in paper coordinates is *not* done in absolute pixel terms, but rather in terms relative to a coordinate system defined with an origin `(0,0)` at `(layout.margin.l, layout.margin.b)` and a point `(1,1)` at `(layout.width-layout.margin.r, layout.height-layout.margin.t)` (note: `layout.margin` values are pixel values, as are `layout.width` and `layout.height`). Paper coordinate values less than 0 or greater than 1 are permitted, and refer to areas within the plot margins.
105
105
106
+
To position an object in "paper" coordinates, the corresponding axis reference
107
+
is set to `"paper"`. For instance a shape's `xref` attribute would be set to
108
+
`"paper"` so that the `x` value of the shape refers to its position in paper
109
+
coordinates.
110
+
106
111
Note that the contents of the `layout.margin` attribute are by default computed based on the position and dimensions of certain items like the title or legend, and may be made dependent on the position and dimensions of tick labels as well when setting the `layout.xaxis.automargin` attribute to `True`. This has the effect of automatically increasing the margin values and therefore shrinking the physical area defined between the `(0,0)` and `(1,1)` points. Positioning certain items at paper coordinates less than 0 or greater than 1 will also trigger this behavior. The `layout.width` and `layout.height`, however, are taken as givens, so a figure will never grow or shrink based on its contents.
107
112
108
113
The figure title may be positioned using "container coordinates" which have `(0,0)` and `(1,1)` anchored at the bottom-left and top-right of the figure, respectively, and therefore are independent of the values of layout.margin.
109
114
115
+
Furthermore, shapes, annotations, and images can be placed relative to an axis's
116
+
domain so that, for instance, an `x` value of `0.5` would place the object
117
+
halfway along the x-axis, regardless of the domain as specified in the
118
+
`layout.xaxis.domain` attribute. This behavior can be specified by adding
119
+
`' domain'` to the axis reference in the axis referencing attribute of the object.
120
+
For example, setting `yref = 'y2 domain'` for a shape will refer to the length
121
+
and position of the axis named `y2`.
122
+
110
123
### 2D Cartesian Trace Types and Subplots
111
124
112
125
The most commonly-used kind of subplot is a [two-dimensional Cartesian subplot](/python/axes/). Traces compatible with these subplots support `xaxis` and `yaxis` attributes whose values must refer to corresponding objects in the layout portion of the figure. For example, if `xaxis="x"`, and `yaxis="y"` (which is the default) then this trace is drawn on the subplot at the intersection of the axes configured under `layout.xaxis` and `layout.yaxis`, but if `xaxis="x2"` and `yaxis="y3"` then the trace is drawn at the intersection of the axes configured under `layout.xaxis2` and `layout.yaxis3`. Note that attributes such as `layout.xaxis` and `layout.xaxis2` etc do not have to be explicitly defined, in which case default values will be inferred. Multiple traces of different types can be drawn on the same subplot.
0 commit comments