Skip to content

Commit d7a0bdd

Browse files
authored
Merge pull request #24 from plotly/master
Sync Fork from Upstream Repo
2 parents 672c73d + 17b7c27 commit d7a0bdd

File tree

8,844 files changed

+143516
-345816
lines changed

Some content is hidden

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

8,844 files changed

+143516
-345816
lines changed

.circleci/config.yml

+154-277
Large diffs are not rendered by default.

.circleci/create_conda_optional_env.sh

-23
This file was deleted.

.circleci/install_miniconda_and_build_.sh

-15
This file was deleted.

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ doc/python/.mapbox_token
4848
doc/.ipynb_checkpoints
4949
tags
5050
doc/check-or-enforce-order.py
51+
52+
packages/javascript/jupyterlab-plotly/lib/
53+
packages/python/plotly/jupyterlab_plotly/labextension/
54+
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*

CHANGELOG.md

+59-10
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,60 @@
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+
## UNRELEASED
56

6-
## [4.14.3] - 2021-01-12
7+
8+
## [5.1.0] - 2021-06-28
9+
10+
- Updated Plotly.js to from version 2.1.0 to version 2.2.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#220----2021-06-28) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
11+
- new `<trace>.legendgrouptitle` attribute for legend group titles
12+
- new `%h` text formatting directive for half-years
13+
- performance improvements and bug fixes
14+
15+
16+
## [5.0.0] - 2021-06-21
17+
18+
### Updated/Changed
19+
20+
Items in this section may be considered backwards-incompatible changes for the purposes of [Semantic Versioning](http://semver.org/) but we expect the vast majority of users to be able to upgrade to version 5.0 without encountering any issues.
21+
22+
- **Dropped support for Python older than 3.6** [#3160](https://github.com/plotly/plotly.py/pull/3160)
23+
- Updated Plotly.js to from version 1.58.4 to version 2.1.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#210----2021-06-18) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
24+
- dropped support for IE9 and IE10
25+
- dropped support for long-deprecated `graph_objects` like `area` traces and `scatter.(t|r)` and `layout.(radial|angular)axis` attributes
26+
- modebar no longer has hovermode or spikeline buttons by default (can be added back with `fig.update_layout(modebar_add=["v1hovermode", "toggleSpikeLines"])`)
27+
- "Aa" text no longer appears on legend items unless `mode="text"`
28+
- In `bar` traces, `textposition` now defaults to `"auto"`
29+
- Font size for legend and colorbar titles now matches axis title font size (slightly bigger)
30+
- deprecated `heatmapgl`, `pointcloud` traces as well as all `transform` attributes
31+
- Combined `plotlywidget` into `jupyterlab-plotly` and packaged them as a federated extension [#3142](https://github.com/plotly/plotly.py/pull/3142) with massive thanks to [@fcollonval](https://github.com/fcollonval) for the contribution
32+
- In addition to this change, large Plotly.js bundles are now lazily loaded on-demand by JupyterLab
33+
- Plotly.js CDN url will now be versioned by default for HTML exports using `include_plotlyjs='cdn'` and for "connected" renderers. [#2961](https://github.com/plotly/plotly.py/pull/2961) with thanks to [@adehad](https://github.com/adehad) for the contribution
34+
- Recommending Kaleido by default over Orca [#3094](https://github.com/plotly/plotly.py/pull/3094)
35+
- Replaced `retrying` dependency with `tenacity` [#2911](https://github.com/plotly/plotly.py/pull/2911) with thanks to [@jmsmdy](https://github.com/jmsmdy) for the contribution
36+
- Plotly Express now always takes into account every value in `category_orders` when computing discrete mappings (color, symbol, line-dash, pattern-shapes) as well as facets, even those values which are absent in the data [#3247](https://github.com/plotly/plotly.py/pull/3247)
37+
38+
### Added
39+
40+
- Additions due to bumping Plotly.js from 1.58.4 to 2.1.0 (see [changelog]((https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#210----2021-06-18))):
41+
- New `icicle` trace type, with thanks to [@Kully](https://github.com/Kully) and [@mtwichan](https://github.com/mtwichan) of [Zyphr](https://www.zyphr.ca/) for their contribution!
42+
- New `marker.pattern` options for `bar`-like trace types with thanks to [@s417-lama](https://github.com/s417-lama) for the contribution!
43+
- New `legendrank` attribute to control rank of traces within legends
44+
- Plotly Express' `px.bar()`, `px.histogram()` and `px.bar_polar()` now support the `pattern_shape` argument [#3252](https://github.com/plotly/plotly.py/pull/3252)
45+
- New Plotly Express `px.icicle()` function, with thanks to [@Kully](https://github.com/Kully) and [@mtwichan](https://github.com/mtwichan) of [Zyphr](https://www.zyphr.ca/) for their contribution! [#3256](https://github.com/plotly/plotly.py/pull/3256)
46+
- New functions in `plotly.colors`: `get_colorscale()` and `sample_colorscale()` [#3136](https://github.com/plotly/plotly.py/pull/3136) and [#3186](https://github.com/plotly/plotly.py/pull/3186) with thanks to [@CarlAndersson](https://github.com/CarlAndersson) for the contributions
47+
- Faster JSON encoding when `orjson` is present [#2955](https://github.com/plotly/plotly.py/pull/2955)
748

849
### Fixed
950

51+
- Pandas and Numpy datetime serialization fixes [#3022](https://github.com/plotly/plotly.py/pull/3022)
52+
- Fixed selected points of histograms in FigureWidget [#2771](https://github.com/plotly/plotly.py/pull/2771) with thanks to [@meffmadd](https://github.com/meffmadd) for the contribution
53+
- Static image export now honors `layout.(width|height)`[#3240](https://github.com/plotly/plotly.py/pull/3240)
54+
- Improvements to "matplotlylib" conversion utility in `plotly.tools.mpl_to_plotly()` with thanks to [@fdion](https://github.com/fdion) [#3143](https://github.com/plotly/plotly.py/pull/3143)
55+
56+
57+
## [4.14.3] - 2021-01-12
58+
1059
- `px.timeline()` now allows `hover_data` formatting of start and end times [3018](https://github.com/plotly/plotly.py/pull/3018)
1160
- Small change to packaging of `plotlywidget` extension for JupyterLab 3 [3021](https://github.com/plotly/plotly.py/pull/3021)
1261

@@ -135,7 +184,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
135184
faster image rendering and smaller figure size. Additional optional arguments
136185
`binary_backend`, `binary_format` and `binary_compression_level` control
137186
how to generate the b64 string ([#2691](https://github.com/plotly/plotly.py/pull/2691)
138-
- `px.imshow` has a new `constrast_rescaling` argument in order to choose how
187+
- `px.imshow` has a new `contrast_rescaling` argument in order to choose how
139188
to set data values corresponding to the bounds of the color range
140189
([#2691](https://github.com/plotly/plotly.py/pull/2691)
141190

@@ -239,7 +288,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
239288

240289
### Added
241290

242-
- The `hover_data` parameter of `px` functions can now be a dictionary. This makes it possible to skip hover information for some arguments or to change the formatting of hover informatiom [#2377](https://github.com/plotly/plotly.py/pull/2377).
291+
- The `hover_data` parameter of `px` functions can now be a dictionary. This makes it possible to skip hover information for some arguments or to change the formatting of hover information [#2377](https://github.com/plotly/plotly.py/pull/2377).
243292
- It's now possible to build a development version of Plotly.py against the build artifacts from a non-`master` branch of Plotly.js, which makes for faster QA and development cycles [#2349](https://github.com/plotly/plotly.py/pull/2349). Thanks [@zouhairm](https://github.com/zouhairm) for this Pull Request!
244293

245294
### Fixed
@@ -252,7 +301,7 @@ This version includes several performance improvements ([#2368](https://github.c
252301

253302
- Child graph objects (e.g. `figure.layout.xaxis`) are no longer created eagerly during graph object construction. Instead, they are created lazily the first time the property is accessed.
254303
- Property validation is now disabled for select internal operations.
255-
- When used with Python 3.7 and above, ploty.py now takes advantage of [PEP-562](https://www.python.org/dev/peps/pep-0562/) to perform submodule imports lazily. This dramatically improves import times.
304+
- When used with Python 3.7 and above, plotly.py now takes advantage of [PEP-562](https://www.python.org/dev/peps/pep-0562/) to perform submodule imports lazily. This dramatically improves import times.
256305

257306
## [4.6.0] - 2020-03-31
258307

@@ -290,7 +339,7 @@ This version includes several performance improvements ([#2368](https://github.c
290339

291340
- Jupyterlab extension now compatible with both Jupyterlab 1.2 and 2.0 [#2261](https://github.com/plotly/plotly.py/pull/2261) with thanks to [@consideRatio](https://github.com/consideRatio) for the contribution!
292341
- Fixed a bug when using boolean values for the color argument of px functions [#2127](https://github.com/plotly/plotly.py/pull/2127)
293-
- Corrected import bug which was occuring with old versions of ipywidgets [#2265](https://github.com/plotly/plotly.py/pull/2265)
342+
- Corrected import bug which was occurring with old versions of ipywidgets [#2265](https://github.com/plotly/plotly.py/pull/2265)
294343
- Fixed python 3.8 syntax warning [#2262](https://github.com/plotly/plotly.py/pull/2262), with thanks to [@sgn](https://github.com/sgn) for the contribution!
295344

296345
## [4.5.3] - 2020-03-05
@@ -365,7 +414,7 @@ This version includes several performance improvements ([#2368](https://github.c
365414
for more information
366415
- The tutorials of the [plotly.py documentation](https://plot.ly/python/) are
367416
now in the main [plotly.py Github repository](https://github.com/plotly/plotly.py). Contributions in order to improve or extend the documentation are very welcome!
368-
- `plotly.express` generated plots no longer have a default height of 600 pixels, instead they inherit the default height of regular figures [#1990](https://github.com/plotly/plotly.py/pull/1990). To restore the old behavior, set `px.defaults.height=600` once per session, or set the `height` keyword arguement to any `px.function()` to 600.
417+
- `plotly.express` generated plots no longer have a default height of 600 pixels, instead they inherit the default height of regular figures [#1990](https://github.com/plotly/plotly.py/pull/1990). To restore the old behavior, set `px.defaults.height=600` once per session, or set the `height` keyword argument to any `px.function()` to 600.
369418

370419
### Fixed
371420

@@ -439,7 +488,7 @@ section [#1969](https://github.com/plotly/plotly.py/pull/1969).
439488
- The width of a figure produced by the `create_gantt` figure factory now resizes responsively ([#1724](https://github.com/plotly/plotly.py/pull/1724))
440489

441490
### Fixed
442-
- The name of the steps property of `graph_objects.indicator.Guage` has been renamed from `stepss` to `steps`
491+
- The name of the steps property of `graph_objects.indicator.Gauge` has been renamed from `stepss` to `steps`
443492
- Avoid crash in iframe renderers when running outside iPython ([#1723](https://github.com/plotly/plotly.py/pull/1723))
444493

445494
## [4.1.0] - 2019-08-06
@@ -491,7 +540,7 @@ This is a major release that includes many new features, and a few breaking chan
491540
- Added support for all trace types in `make_subplots` ([#1528](https://github.com/plotly/plotly.py/pull/1528))
492541
- Added support for secondary y-axes in `make_subplots` ([#1564](https://github.com/plotly/plotly.py/pull/1564))
493542
- Support passing a scalar trace object (rather than a list or tuple of trace objects) as the `data` property to the `Figure` constructor ([#1614](https://github.com/plotly/plotly.py/pull/1614))
494-
- Added dictionary-stule `.pop` method to graph object classes ([#1614](https://github.com/plotly/plotly.py/pull/1614))
543+
- Added dictionary-style `.pop` method to graph object classes ([#1614](https://github.com/plotly/plotly.py/pull/1614))
495544
- New `jupyterlab-plotly` JupyterLab extension for rendering figures in JupyterLab. Replaces the `@jupyterlab/plotly-extension` extension, and includes JupyterLab 1.0 support.
496545
- Added new suite of built-in colorscales to the `plotly.colors` module, and support for specifying this wide range of colorscales by name. Also added support for specifying colorscales as a list of colors, in which case the color spacing is assumed to be uniform ([#1647](https://github.com/plotly/plotly.py/pull/1647)).
497546
- Added `sphinx-gallery` renderer for embedding plotly figures in [Sphinx-Gallery](https://sphinx-gallery.github.io/) ([#1577](https://github.com/plotly/plotly.py/pull/1577), [plotly/plotly-sphinx-gallery](https://github.com/plotly/plotly-sphinx-gallery)).
@@ -1096,7 +1145,7 @@ must be installed:
10961145
properties are ignored rather than causing an exception.
10971146
- A `to_ordered_dict` method has been added to the `Figure` and `FigureWidget`
10981147
classes. This method returns a representation of the figure as a nested
1099-
structure of `OrdererdDict` and `list` instances where the keys in each
1148+
structure of `OrderedDict` and `list` instances where the keys in each
11001149
`OrderedDict` are sorted alphabetically. This method replaces the
11011150
`get_ordered` method that was available in version 2, and makes it possible
11021151
to traverse the nested structure of a figure in a deterministic order.
@@ -1517,7 +1566,7 @@ gone.
15171566
## [1.12.10] - 2016-11-28
15181567
### Updated
15191568
- `FF.create_violin` and `FF.create_scatterplotmatrix` now by default do not print subplot grid information in output
1520-
- Removed alert that occured when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See: `help(py.image)` for more details.
1569+
- Removed alert that occurred when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See: `help(py.image)` for more details.
15211570

15221571
### Added
15231572
- Plot configuration options for offline plots. See the list of [configuration options](https://github.com/Rikorose/plotly.py/blob/master/plotly/offline/offline.py#L189) and [examples](https://plot.ly/javascript/configuration-options/) for more information.

README.md

+21-24
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333

3434
## Data Science Workspaces
3535

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.
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.
3737

3838
## Quickstart
3939

40-
`pip install plotly==4.14.3`
40+
`pip install plotly==5.1.0`
4141

42-
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.5"`):
42+
Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
4343

4444
```python
4545
import plotly.graph_objects as go
@@ -86,57 +86,54 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
8686
plotly.py may be installed using pip...
8787

8888
```
89-
pip install plotly==4.14.3
89+
pip install plotly==5.1.0
9090
```
9191

9292
or conda.
9393

9494
```
95-
conda install -c plotly plotly=4.14.3
95+
conda install -c plotly plotly=5.1.0
9696
```
9797

98-
### Jupyter Notebook Support
98+
### JupyterLab Support
9999

100-
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
100+
For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
101101
packages using `pip`:
102102

103103
```
104-
pip install "notebook>=5.3" "ipywidgets>=7.5"
104+
$ pip install "jupyterlab>=3" "ipywidgets>=7.6"
105105
```
106106

107107
or `conda`:
108108

109109
```
110-
conda install "notebook>=5.3" "ipywidgets>=7.5"
110+
$ conda install "jupyterlab>=3" "ipywidgets>=7.6"
111111
```
112112

113-
### JupyterLab Support
114-
115-
For use in JupyterLab, install the `jupyterlab` and `ipywidgets`
116-
packages using `pip`:
113+
The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
117114

118115
```
119-
pip install jupyterlab "ipywidgets>=7.5"
116+
# JupyterLab 2.x renderer support
117+
jupyter labextension install jupyterlab-plotly@5.1.0 @jupyter-widgets/jupyterlab-manager
120118
```
121119

122-
or `conda`:
120+
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
121+
122+
### Jupyter Notebook Support
123+
124+
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
125+
packages using `pip`:
123126

124127
```
125-
conda install jupyterlab "ipywidgets>=7.5"
128+
pip install "notebook>=5.3" "ipywidgets>=7.5"
126129
```
127130

128-
Then run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):
131+
or `conda`:
129132

130133
```
131-
# Basic JupyterLab renderer support
132-
jupyter labextension install jupyterlab-plotly@4.14.3
133-
134-
# OPTIONAL: Jupyter widgets extension for FigureWidget support
135-
jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.14.3
134+
conda install "notebook>=5.3" "ipywidgets>=7.5"
136135
```
137136

138-
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
139-
140137
### Static Image Export
141138

142139
plotly.py supports [static image export](https://plotly.com/python/static-image-export/),

binder/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==4.14.3
2+
plotly==5.1.0
33
jupyter
44
notebook
55
pandas==1.0.3

bld.bat

-8
This file was deleted.

build.sh

-9
This file was deleted.

build_for_conda.md

-19
This file was deleted.

0 commit comments

Comments
 (0)