Skip to content

Commit 631756e

Browse files
Merge branch 'plotly:master' into patch-2
2 parents e2765e7 + 5e079e1 commit 631756e

File tree

801 files changed

+13654
-54777
lines changed

Some content is hidden

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

801 files changed

+13654
-54777
lines changed

.circleci/config.yml

+24-16
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ commands:
4646
. venv/bin/activate
4747
pip install --upgrade pip wheel
4848
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
49+
cd js
50+
npm ci
51+
npm run build
4952
- run:
5053
name: Install plotly-geo
5154
command: |
@@ -249,13 +252,13 @@ jobs:
249252
- test_optional:
250253
py: "312_no_numpy"
251254

252-
# Orca
253-
python_38_orca:
255+
python_312_np2:
254256
docker:
255-
- image: cimg/python:3.8-browsers
257+
- image: cimg/python:3.12-browsers
256258
steps:
257-
- test_orca:
258-
py: "38"
259+
- test_optional:
260+
py: "312_np2"
261+
259262

260263
# Percy
261264
python_39_percy:
@@ -347,9 +350,9 @@ jobs:
347350
. venv/bin/activate
348351
pip install --upgrade pip wheel
349352
pip install -r ./test_requirements/requirements_38_core.txt black inflect
350-
pip install jupyterlab~=3.0
353+
pip install jupyterlab
351354
- run:
352-
name: Update jupyterlab-plotly version
355+
name: Update jupyter widget plotly.js version
353356
command: |
354357
cd packages/python/plotly
355358
. venv/bin/activate
@@ -403,7 +406,7 @@ jobs:
403406
conda config --remove channels defaults
404407
conda config --add channels conda-forge
405408
conda create -n env --yes python=3.9 conda-build=3.28.4 conda-verify
406-
conda install -n env -c conda-forge jupyterlab=3 nodejs=16
409+
conda install -n env -c conda-forge jupyterlab nodejs=16
407410
conda init bash
408411
mkdir output
409412
@@ -412,9 +415,9 @@ jobs:
412415
command: |
413416
eval "$(conda shell.bash hook)"
414417
conda activate env
415-
cd packages/javascript/jupyterlab-plotly
418+
cd packages/python/plotly/js
416419
npm ci
417-
npm run build:prod
420+
npm run build
418421
git status
419422
420423
- run:
@@ -438,13 +441,13 @@ jobs:
438441
git status
439442
440443
- run:
441-
name: NPM Pack
444+
name: Build Widget javascript bundle
442445
command: |
443446
eval "$(conda shell.bash hook)"
444447
conda activate env
445-
cd packages/javascript/jupyterlab-plotly
446-
npm pack
447-
mv jupyterlab-plotly*.tgz ../../../output
448+
cd packages/python/plotly/js
449+
npm ci
450+
npm run build
448451
449452
- run:
450453
name: Zip output
@@ -491,7 +494,12 @@ jobs:
491494
pip install -r requirements.txt
492495
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
493496
pip uninstall -y plotly
494-
pip install -e ../packages/python/plotly
497+
cd ../packages/python/plotly
498+
pip install -e .
499+
cd js
500+
npm ci
501+
npm run build
502+
cd ../../../../doc
495503
fi
496504
cd ..
497505
- run:
@@ -613,7 +621,7 @@ workflows:
613621
- python_311_optional
614622
- python_312_optional
615623
- python_39_pandas_2_optional
616-
- python_38_orca
617624
- python_39_percy
618625
- python_312_no_numpy
626+
- python_312_np2
619627
- build-doc

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ build
4545
dist
4646
plotly.egg-info/
4747

48+
# macOS utility file
49+
**/.DS_Store
50+
4851
plotly/tests/test_orca/images/*/failed
4952
plotly/tests/test_orca/images/*/tmp
5053
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
@@ -59,6 +62,7 @@ doc/check-or-enforce-order.py
5962
packages/javascript/jupyterlab-plotly/lib/
6063
packages/python/plotly/jupyterlab_plotly/labextension/
6164
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
65+
packages/python/plotly/plotly/package_data/widgetbundle.js
6266

6367
test/percy/*.html
6468
test/percy/pandas2/*.html

CHANGELOG.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,45 @@
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+
## [6.0.0] - 2025-01-28
6+
7+
### Added
8+
- Add `plotly[express]` extra for easily installing Plotly Express dependencies [[#4644](https://github.com/plotly/plotly.py/pull/4644)]
9+
- Add `subtitle` attribute to all Plotly Express traces [[#4830](https://github.com/plotly/plotly.py/pull/4830)].
10+
11+
### Removed
12+
- Drop deprecated `pointcloud` and `heatmapgl` traces from the API [[#4815](https://github.com/plotly/plotly.py/pull/4815)]
13+
- Drop `tenacity` dependency [[#4831](https://github.com/plotly/plotly.py/pull/4831)]
14+
- Drop support for Jupyter Notebook version 6 and earlier [[#4822](https://github.com/plotly/plotly.py/pull/4822)]. The minimum supported version is now 7.0.0.
15+
16+
### Updated
17+
- Update Plotly.js from version 2.34.2 to version 3.0.0 See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#300----2025-01-27) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
18+
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
19+
- Drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` [[#7212](https://github.com/plotly/plotly.js/pull/7212)].
20+
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
21+
- Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)]
22+
- Drop support for deprecated `annotation.ref` attribute (use `annotation.xref` and `annotation.yref` instead) [[#7215](https://github.com/plotly/plotly.js/pull/7215)]
23+
- Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]
24+
- Drop support for deprecated attribute `gl3d.cameraposition` (use `gl3d.camera` instead) [[#7217](https://github.com/plotly/plotly.js/pull/7217)]
25+
- Drop deprecated `plot3dPixelRatio` from config [[#7231](https://github.com/plotly/plotly.js/pull/7231)]
26+
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
27+
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
28+
- Drop `transforms` from the API [[#7240](https://github.com/plotly/plotly.js/pull/7240), [#7254](https://github.com/plotly/plotly.js/pull/7254)]
29+
- Deprecate Mapbox-based traces.[[#4900](https://github.com/plotly/plotly.py/pull/4900)]. See the [MapLibre Migration](https://plotly.com/python/mapbox-to-maplibre/) page for details on migrating from Mapbox to Maplibre.
30+
- Update plotly.py to use base64 encoding of typed arrays e.g. numpy in plotly JSON to keep precision intact and improve performance [[#4470](https://github.com/plotly/plotly.py/pull/4470)].
31+
- Make plotly-express dataframe agnostic via Narwhals [[#4790](https://github.com/plotly/plotly.py/pull/4790)].
32+
- Update `go.FigureWidget` to use `anywidget` [[#4823](https://github.com/plotly/plotly.py/pull/4823)]
33+
- Use modern [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to load plotly.js bundle instead of requirejs which is [no longer under active development](https://github.com/requirejs/r.js/compare/2.3.6...2.3.7) [[#4736](https://github.com/plotly/plotly.py/pull/4763)]
34+
35+
### Fixed
36+
- Fix a bug in JupyterLab >= 4 and Jupyter Notebook >= 7 that caused LaTeX to not render in plotly charts [[#4763](https://github.com/plotly/plotly.py/pull/4763)].
37+
- Fix `go.FigureWidget.show` to return `FigureWidget` instead of displaying `Figure` [[#4869](https://github.com/plotly/plotly.py/pull/4869)]
38+
539
## [5.24.1] - 2024-09-12
640

741
### Updated
842

9-
- Updated Plotly.js from version 2.35.0 to version 2.35.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2352----2024-09-10) for more information.
43+
- Updated Plotly.js from version 2.35.0 to version 3.0.0-rc.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2352----2024-11-11) for more information.
1044

1145
## [5.24.0] - 2024-08-29
1246

CITATION.cff

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Kruchten"
5+
given-names: "Nicolas"
6+
orcid: https://orcid.org/0000-0002-8416-789X
7+
- family-names: "Seier"
8+
given-names: "Andrew"
9+
- family-names: "Parmer"
10+
given-names: "Chris"
11+
title: "An interactive, open-source, and browser-based graphing library for Python"
12+
version: 5.24.1
13+
doi: 10.5281/zenodo.14503524
14+
date-released: 2024-09-12
15+
url: "https://github.com/plotly/plotly.py"

LICENSE.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2016-2018 Plotly, Inc
3+
Copyright (c) 2016-2024 Plotly Technologies Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+10-69
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@
3737
</a>
3838
</div>
3939

40-
4140
## Quickstart
4241

43-
`pip install plotly==5.24.1`
44-
45-
Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
42+
`pip install plotly`
4643

4744
```python
4845
import plotly.express as px
@@ -52,7 +49,6 @@ fig.show()
5249

5350
See the [Python documentation](https://plotly.com/python/) for more examples.
5451

55-
5652
## Overview
5753

5854
[plotly.py](https://plotly.com/python/) is an interactive, open-source, and browser-based graphing library for Python :sparkles:
@@ -74,63 +70,37 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
7470
- [Contributing to plotly](https://github.com/plotly/plotly.py/blob/master/contributing.md)
7571
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
7672
- [Code of Conduct](https://github.com/plotly/plotly.py/blob/master/CODE_OF_CONDUCT.md)
77-
- [Version 4 Migration Guide](https://plotly.com/python/v4-migration/)
78-
- [New! Announcing Dash 1.0](https://medium.com/plotly/welcoming-dash-1-0-0-f3af4b84bae)
7973
- [Community forum](https://community.plotly.com)
8074

8175
---
8276

8377
## Installation
8478

85-
plotly.py may be installed using pip...
79+
plotly.py may be installed using pip
8680

8781
```
88-
pip install plotly==5.24.1
82+
pip install plotly
8983
```
9084

9185
or conda.
9286

9387
```
94-
conda install -c plotly plotly=5.24.1
95-
```
96-
97-
### JupyterLab Support
98-
99-
For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
100-
packages using `pip`:
101-
102-
```
103-
pip install "jupyterlab>=3" "ipywidgets>=7.6"
104-
```
105-
106-
or `conda`:
107-
108-
```
109-
conda install "jupyterlab>=3" "ipywidgets>=7.6"
110-
```
111-
112-
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):
113-
114-
```
115-
# JupyterLab 2.x renderer support
116-
jupyter labextension install [email protected] @jupyter-widgets/jupyterlab-manager
88+
conda install -c plotly plotly
11789
```
11890

119-
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
91+
### Jupyter Widget Support
12092

121-
### Jupyter Notebook Support
122-
123-
For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
93+
For use as a Jupyter widget, install `jupyter` and `anywidget`
12494
packages using `pip`:
12595

12696
```
127-
pip install "notebook>=5.3" "ipywidgets>=7.5"
97+
pip install jupyter anywidget
12898
```
12999

130100
or `conda`:
131101

132102
```
133-
conda install "notebook>=5.3" "ipywidgets>=7.5"
103+
conda install jupyter anywidget
134104
```
135105

136106
### Static Image Export
@@ -143,41 +113,18 @@ command line utility (legacy as of `plotly` version 4.9).
143113
#### Kaleido
144114

145115
The [`kaleido`](https://github.com/plotly/Kaleido) package has no dependencies and can be installed
146-
using pip...
116+
using pip
147117

148118
```
149119
pip install -U kaleido
150120
```
151121

152-
or conda.
122+
or conda
153123

154124
```
155125
conda install -c conda-forge python-kaleido
156126
```
157127

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.
165-
166-
These dependencies can both be installed using conda:
167-
168-
```
169-
conda install -c plotly plotly-orca==1.3.1 psutil
170-
```
171-
172-
Or, `psutil` can be installed using pip...
173-
174-
```
175-
pip install psutil
176-
```
177-
178-
and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca).
179-
180-
181128
### Extended Geo Support
182129

183130
Some plotly.py features rely on fairly large geographic shape files. The county
@@ -194,12 +141,6 @@ or conda
194141
conda install -c plotly plotly-geo=1.0.0
195142
```
196143

197-
## Migration
198-
199-
If you're migrating from plotly.py v3 to v4, please check out the [Version 4 migration guide](https://plotly.com/python/v4-migration/)
200-
201-
If you're migrating from plotly.py v2 to v3, please check out the [Version 3 migration guide](https://github.com/plotly/plotly.py/blob/master/migration-guide.md)
202-
203144
## Copyright and Licenses
204145

205146
Code and documentation copyright 2019 Plotly, Inc.

binder/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==5.24.1
2+
plotly==6.0.0
33
jupyter
44
notebook
55
pandas==2.2.2

0 commit comments

Comments
 (0)