Skip to content

Commit 902a98e

Browse files
committed
Merge branch 'master' of https://github.com/plotly/plotly.py
2 parents 3ef3764 + 1b5f637 commit 902a98e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+217815
-8767
lines changed

CHANGELOG.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,35 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.10.0] - unreleased
56

6-
## [4.9.0] - unreleased
7+
8+
## [4.9.1] - unreleased
9+
10+
11+
## [4.9.0] - 2020-07-16
712

813
### Added
914

10-
- `px.NO_COLOR` constant to override wide-form color assignment in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
15+
- Added image export support using [Kaleido](https://github.com/plotly/Kaleido). The image export backend can be configured using the new `engine` argument to `plotly.io.to_image` and `plotly.io.write_image`. The `engine` argument may be set to `"kaleido"`, `"orca"`, or `"auto"`. The default is `engine="auto"`, in which case the Kaleido backend is enabled if the `kaleido` package from PyPI is installed, otherwise Orca is used. ([#2613](https://github.com/plotly/plotly.py/pull/2613)).
16+
- `plotly.express.timeline()` added as an official alternative to `plotly.figure_factories.create_gantt()` ([#2626](https://github.com/plotly/plotly.py/pull/2626))
17+
- `create_hexbin_mapbox()` added to Figure Factories, with thanks to [@RenaudLN](https://github.com/RenaudLN) for the impressive contribution!
1118
- `facet_row_spacing` and `facet_col_spacing` added to Plotly Express cartesian 2d functions ([#2614](https://github.com/plotly/plotly.py/pull/2614))
19+
- `base` added to Plotly Express `bar` and `bar_polar` functions ([#2626](https://github.com/plotly/plotly.py/pull/2626))
20+
- `px.NO_COLOR` constant to override wide-form color assignment in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
1221

1322
### Fixed
1423

1524
- trendline traces are now of type `scattergl` when `render_mode="webgl"` in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
25+
- regression from 4.8.1 whereby `"parent"` was not accepted as part of `path` for `px.sunburst()` and `px.treemap()` ([#2640](https://github.com/plotly/plotly.py/pull/2640))
26+
- `create_dendrogram()` figure factory now works correctly with `scipy` 1.5.1 ([#2627](https://github.com/plotly/plotly.py/pull/2627))
1627

1728
### Updated
1829

19-
- Added all cartesian-2d Plotly Express functions, plus `imshow` to Pandas backend with `kind` option
30+
- Updated Plotly.js to version 1.54.6. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.54.6/CHANGELOG.md) for more information.
31+
- Added all cartesian-2d Plotly Express functions, plus `imshow`, to Pandas backend with `kind` option ([#2541](https://github.com/plotly/plotly.py/pull/2541))
2032
- `plotly.express.imshow` now uses data frame index and columns names and values to populate axis parameters by default ([#2539](https://github.com/plotly/plotly.py/pull/2539))
21-
33+
- Javascript extensions are now build using Node 12, and have an updated `package-lock.json` with many fewer security warnings ([#2636](https://github.com/plotly/plotly.py/pull/2636))
2234

2335

2436
## [4.8.2] - 2020-06-26
@@ -28,7 +40,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2840
- Updated Plotly.js to version 1.54.5. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.54.5/CHANGELOG.md) for more information.
2941
- `add_traces()` now accepts bare `int`-like values for `rows`/`cols` as well as lists thereof ([#2546](https://github.com/plotly/plotly.py/pull/2546)), with thanks to [@MCBoarder289](https://github.com/MCBoarder289) for the contribution!
3042

31-
3243
### Fixed
3344

3445
- `row`/`col` now accept `int`-like values, not strictly `int` values ([#2451](https://github.com/plotly/plotly.py/pull/2451)), with thanks to [@MCBoarder289](https://github.com/MCBoarder289) for the contribution!
@@ -41,6 +52,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4152
- `px.line` now sets `line_group=<variable>` in wide mode by default ([#2599](https://github.com/plotly/plotly.py/pull/2599))
4253
- Corrected some regex warnings ([#2577](https://github.com/plotly/plotly.py/pull/2577)), with thanks to [@georgevdd](https://github.com/georgevdd) for the contribution!
4354

55+
4456
## [4.8.1] - 2020-05-28
4557

4658
### Fixed

README.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
## Quickstart
3535

36-
`pip install plotly==4.8.2`
36+
`pip install plotly==4.9.0`
3737

3838
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.2"`):
3939

@@ -82,13 +82,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
8282
plotly.py may be installed using pip...
8383

8484
```
85-
pip install plotly==4.8.2
85+
pip install plotly==4.9.0
8686
```
8787

8888
or conda.
8989

9090
```
91-
conda install -c plotly plotly=4.8.2
91+
conda install -c plotly plotly=4.9.0
9292
```
9393

9494
### Jupyter Notebook Support
@@ -125,20 +125,43 @@ Then run the following commands to install the required JupyterLab extensions (n
125125

126126
```
127127
# Basic JupyterLab renderer support
128-
jupyter labextension install jupyterlab-plotly@4.8.2
128+
jupyter labextension install jupyterlab-plotly@4.9.0
129129
130130
# OPTIONAL: Jupyter widgets extension for FigureWidget support
131-
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.8.2
131+
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.9.0
132132
```
133133

134134
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
135135

136136
### Static Image Export
137137

138-
plotly.py supports static image export using the `to_image` and `write_image`
139-
functions in the `plotly.io` package. This functionality requires the
140-
installation of the plotly [orca](https://github.com/plotly/orca) command line utility and the
141-
[`psutil`](https://github.com/giampaolo/psutil) Python package.
138+
plotly.py supports [static image export](https://plotly.com/python/static-image-export/),
139+
using the either the [`kaleido`](https://github.com/plotly/Kaleido)
140+
package (recommended, supported as of `plotly` version 4.9) or the [orca](https://github.com/plotly/orca)
141+
command line utility (legacy as of `plotly` version 4.9).
142+
143+
#### Kaleido
144+
145+
The [`kaleido`](https://github.com/plotly/Kaleido) package has no dependencies and can be installed
146+
using pip...
147+
148+
```
149+
$ pip install -U kaleido
150+
```
151+
152+
or conda.
153+
154+
```
155+
$ conda install -c plotly python-kaleido
156+
```
157+
158+
#### Orca
159+
160+
While Kaleido is now the recommended image export approach because it is easier to install
161+
and more widely compatible, [static image export](https://plotly.com/python/static-image-export/)
162+
can also be supported
163+
by the legacy [orca](https://github.com/plotly/orca) command line utility and the
164+
[`psutil`](https://github.com/giampaolo/psutil) Python package.
142165

143166
These dependencies can both be installed using conda:
144167

@@ -154,13 +177,6 @@ pip install psutil
154177

155178
and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca).
156179

157-
#### Troubleshooting
158-
159-
##### Wrong Executable found
160-
161-
If you get an error message stating that the `orca` executable that was found is not valid, this may be because another executable with the same name was found on your system. Please specify the complete path to the Plotly-Orca binary that you downloaded (for instance in the Miniconda folder) with the following command:
162-
163-
`plotly.io.orca.config.executable = '/home/your_name/miniconda3/bin/orca'`
164180

165181
### Extended Geo Support
166182

binder/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==4.8.2
2+
plotly==4.9.0
33
jupyter
44
notebook
55
pandas==1.0.3
@@ -15,3 +15,4 @@ scikit-image
1515
datashader
1616
pyarrow
1717
cufflinks==0.17.3
18+
kaleido

doc/apidoc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# The short X.Y version
2929
version = ""
3030
# The full version, including alpha/beta/rc tags
31-
release = "4.8.2"
31+
release = "4.9.0"
3232

3333

3434
# -- General configuration ---------------------------------------------------

doc/python/2D-Histogram.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fig.show()
9696

9797
### 2D Histograms with Graph Objects
9898

99-
To build this kind of plot without using Plotly Express, we can use the `go.Histogram2d` class.
99+
To build this kind of figure using [graph objects](/python/graph-objects/) without using Plotly Express, we can use the `go.Histogram2d` class.
100100

101101

102102
### 2D Histogram of a Bivariate Normal Distribution ###
@@ -236,4 +236,4 @@ fig.show()
236236
```
237237

238238
#### Reference
239-
See https://plotly.com/python/reference/#histogram2d for more information and chart attribute options!
239+
See https://plotly.com/python/reference/#histogram2d for more information and chart attribute options!

doc/python/2d-histogram-contour.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fig.show()
9595

9696
### 2D Histograms with Graph Objects
9797

98-
To build this kind of plot without using Plotly Express, we can use the `go.Histogram2d` class.
98+
To build this kind of figure with [graph objects](/python/graph-objects/) without using Plotly Express, we can use the `go.Histogram2d` class.
9999

100100
#### Basic 2D Histogram Contour
101101

@@ -249,4 +249,4 @@ fig.show()
249249
```
250250

251251
#### Reference
252-
See https://plotly.com/python/reference/#histogram2dcontour for more information and chart attribute options!
252+
See https://plotly.com/python/reference/#histogram2dcontour for more information and chart attribute options!

doc/python/animations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jupyter:
2525

2626
#### Animated figures with Plotly Express
2727

28-
Several Plotly Express functions support the creation of animated figures through the `animation_frame` and `animation_group` arguments.
28+
Several [Plotly Express](/python/plotly-express/) functions support the creation of animated figures through the `animation_frame` and `animation_group` arguments.
2929

3030
Here is an example of an animated scatter plot creating using Plotly Express. Note that you should always fix the `x_range` and `y_range` to ensure that your data remains visible throughout the animation.
3131

@@ -54,12 +54,12 @@ fig.show()
5454
### Current Animation Limitations and Caveats
5555

5656
* Animations are designed to work well when each row of input is present across all animation frames, and when categorical values mapped to symbol, color and facet are constant across frames. Animations *may be misleading or inconsistent* if these constraints are not met.
57-
* Although Plotly Express supports animation for many chart and map types, smooth inter-frame transitions are today only possible for scatter and bar
58-
* Plotly Express will not automatically compute the union of all x/y/color ranges, so these must be specified manually to avoid scale jumps across frames
57+
* Although Plotly Express supports animation for many chart and map types, smooth inter-frame transitions are today *only* possible for `scatter` and `bar`
58+
* Plotly Express will *not* automatically compute the union of all x/y/color ranges, so these must be specified manually to avoid scale jumps across frames
5959

6060
#### Animated figures with Graph Objects
6161

62-
The remainder of this section describes the low-level API for constructing animated figures manually.
62+
The remainder of this section describes the low-level [graph objects](/python/graph-objects/) API for constructing animated figures manually.
6363

6464
#### Frames
6565

doc/python/bubble-maps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jupyter:
3535

3636
#### Base Map Configuration
3737

38-
Plotly figures made with `px.scatter_geo`, `px.line_geo` or `px.choropleth` functions or containing `go.Choropleth` or `go.Scattergeo` graph objects have a `go.layout.Geo` object which can be used to [control the appearance of the base map](/python/map-configuration/) onto which data is plotted.
38+
Plotly figures made with [Plotly Express](/python/plotly-express/) `px.scatter_geo`, `px.line_geo` or `px.choropleth` functions or containing `go.Choropleth` or `go.Scattergeo` [graph objects](/python/graph-objects/) have a `go.layout.Geo` object which can be used to [control the appearance of the base map](/python/map-configuration/) onto which data is plotted.
3939

4040
### Bubble map with Plotly Express
4141

@@ -208,4 +208,4 @@ fig.show()
208208

209209
#### Reference
210210

211-
See https://plotly.com/python/reference/#choropleth and https://plotly.com/python/reference/#scattergeo for more information and chart attribute options!
211+
See https://plotly.com/python/reference/#choropleth and https://plotly.com/python/reference/#scattergeo for more information and chart attribute options!

doc/python/choropleth-maps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Below we show how to create Choropleth Maps using either Plotly Express' `px.cho
3939

4040
#### Base Map Configuration
4141

42-
Plotly figures made with `px.scatter_geo`, `px.line_geo` or `px.choropleth` functions or containing `go.Choropleth` or `go.Scattergeo` graph objects have a `go.layout.Geo` object which can be used to [control the appearance of the base map](/python/map-configuration/) onto which data is plotted.
42+
Plotly figures made with [Plotly Express](/python/plotly-express/) `px.scatter_geo`, `px.line_geo` or `px.choropleth` functions or containing `go.Choropleth` or `go.Scattergeo` [graph objects](/python/graph-objects/) have a `go.layout.Geo` object which can be used to [control the appearance of the base map](/python/map-configuration/) onto which data is plotted.
4343

4444
### Introduction: main parameters for choropleth outline maps
4545

@@ -347,4 +347,4 @@ fig.show()
347347

348348
#### Reference
349349

350-
See https://plotly.com/python/reference/#choropleth for more information and chart attribute options!
350+
See https://plotly.com/python/reference/#choropleth for more information and chart attribute options!

doc/python/colorscales.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This document explains the following four continuous-color-related concepts:
5252

5353
### Continuous Color with Plotly Express
5454

55-
Most Plotly Express functions accept a `color` argument which automatically assigns data values to continuous color **if the data is numeric**. If the data contains strings, the color will automatically be considered [discrete (also known as categorical or qualitative)](/python/discrete-color/). This means that numeric strings must be parsed to be used for continuous color, and conversely, numbers used as category codes must be converted to strings.
55+
Most [Plotly Express](/python/plotly-express/) functions accept a `color` argument which automatically assigns data values to continuous color **if the data is numeric**. If the data contains strings, the color will automatically be considered [discrete (also known as categorical or qualitative)](/python/discrete-color/). This means that numeric strings must be parsed to be used for continuous color, and conversely, numbers used as category codes must be converted to strings.
5656

5757
For example, in the `tips` dataset, the `size` column contains numbers:
5858

@@ -92,7 +92,7 @@ fig.show()
9292

9393
### Color Scales in Plotly Express
9494

95-
By default, Plotly Express will use the color scale from the active [template](/python/templates/)'s `layout.colorscales.sequential` attribute, and the default active template is `plotly` which uses the `Plasma` color scale. You can choose any of the [built-in color scales](/python/builtin-colorscales/), however, or define your own.
95+
By default, [Plotly Express](/python/plotly-express/) will use the color scale from the active [template](/python/templates/)'s `layout.colorscales.sequential` attribute, and the default active template is `plotly` which uses the `Plasma` color scale. You can choose any of the [built-in color scales](/python/builtin-colorscales/), however, or define your own.
9696

9797
Here is an example that creates a scatter plot using Plotly Express, with points colored using the Viridis color scale.
9898

@@ -557,4 +557,4 @@ fig.show()
557557

558558
### Reference
559559

560-
See https://plotly.com/python/reference/ for more information and chart attribute options!
560+
See https://plotly.com/python/reference/ for more information and chart attribute options!

doc/python/figure-factories.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jupyter:
3535

3636
#### `plotly.figure_factory`
3737

38-
The `plotly.figure_factory` module contains dedicated functions for creating very specific types of plots that were at the time of their creation difficult to create with `plotly.graph_objects` and prior to the existence of [Plotly Express](/python/plotly-express/). As new functionality gets added to [Plotly.js](https://plotly.com/javascript/) and to Plotly Express, certain Figure Factories become unecessary and are therefore deprecated as "legacy", but remain in the module for backwards-compatibility reasons.
38+
The `plotly.figure_factory` module contains dedicated functions for creating very specific types of plots that were at the time of their creation difficult to create with [graph objects](/python/graph-objects/) and prior to the existence of [Plotly Express](/python/plotly-express/). As new functionality gets added to [Plotly.js](https://plotly.com/javascript/) and to Plotly Express, certain Figure Factories become unecessary and are therefore deprecated as "legacy", but remain in the module for backwards-compatibility reasons.
3939

4040
The following types of plots are still difficult to create with Graph Objects or Plotly Express and therefore the corresponding Figure Factories are *not* deprecated:
4141

4242
* [Annotated Heatmaps](/python/annotated-heatmap/)
4343
* [Dendrograms](/python/dendrogram/)
44-
* [Gantt Charts](/python/gantt/)
44+
* [Hexagonal Binning Tile Map](/python/hexbin-mapbox/)
4545
* [Quiver Plots](/python/quiver-plots/)
4646
* [Streamline Plots](/python/streamline-plots/)
4747
* [Tables](/python/figure-factory-table/)
@@ -52,7 +52,8 @@ Deprecated "legacy" Figure Factories include:
5252

5353
* [County Choropleth Maps](/python/county-choropleth/), deprecated by regular [Choropleth maps with GeoJSON input](/python/choropleth-maps/)
5454
* [Distplots](/python/distplot/), mostly deprecated by [`px.histogram`](/python/histograms/)
55+
* [Gantt Charts](/python/gantt/), deprecated by [`px.timeline`](/python/gantt/)
5556

5657
#### Reference
5758

58-
For more information about the contents of `plotly.figure_factory`, including deprecated methods, please refer to our [API Reference documentation](https://plotly.com/python-api-reference/plotly.figure_factory.html).
59+
For more information about the contents of `plotly.figure_factory`, including deprecated methods, please refer to our [API Reference documentation](https://plotly.com/python-api-reference/plotly.figure_factory.html).

0 commit comments

Comments
 (0)