Skip to content

Commit 5433a6c

Browse files
Merge branch 'master' into patch-1
2 parents e510c6d + 38ded4a commit 5433a6c

File tree

1,301 files changed

+58041
-8820
lines changed

Some content is hidden

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

1,301 files changed

+58041
-8820
lines changed

.circleci/config.yml

Lines changed: 186 additions & 75 deletions
Large diffs are not rendered by default.

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 88

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0
2+
0.html
3+
iframe_figures/
4+
packages/python/plotly/plotly/tests/test_orca/images/linux/failed/
5+
16
*.egg-info
27

38
*.pyc
@@ -6,6 +11,8 @@
611

712
*~
813

14+
doc/python/raw.githubusercontent.com/
15+
916
# Don't ignore dataset files
1017
!*.csv.gz
1118

@@ -52,3 +59,6 @@ doc/check-or-enforce-order.py
5259
packages/javascript/jupyterlab-plotly/lib/
5360
packages/python/plotly/jupyterlab_plotly/labextension/
5461
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
62+
63+
test/percy/*.html
64+
test/percy/pandas2/*.html

CHANGELOG.md

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,157 @@
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-
## [5.10.0] - 2022-08-11
5+
## [UNRELEASED]
6+
7+
### Fixed
8+
- Fix issue with creating dendrogram in subplots [[#4411](https://github.com/plotly/plotly.py/pull/4411)],
9+
- Fix issue with px.line not accepting "spline" line shape [[#2812](https://github.com/plotly/plotly.py/issues/2812)],
10+
11+
## [5.18.0] - 2023-10-25
12+
13+
### Updated
14+
- Updated Plotly.js from version 2.26.0 to version 2.27.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2270----2023-10-20) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
15+
- Add `insiderange` to cartesian axes to help avoid overlap between visible grid lines and tick labels of the counter axis when they are positioned inside [[#6735](https://github.com/plotly/plotly.js/pull/6735)], this feature was anonymously sponsored: thank you to our sponsor!
16+
- Fix column order changes on hover [[#6718](https://github.com/plotly/plotly.js/pull/6718)],
17+
with thanks to @bhavinpatel1109 for the contribution!
18+
- Fix hover at timestamp '1970-01-01 00:00:00' [[#6752](https://github.com/plotly/plotly.js/pull/6752)],
19+
with thanks to @adamjhawley for the contribution!
20+
- Fix clearing empty `candlestick` using react [[#6757](https://github.com/plotly/plotly.js/pull/6757)]
21+
22+
### Fixed
23+
- Repair crash on Matplotlib 3.8 related to get_offset_position [[#4372](https://github.com/plotly/plotly.py/pull/4372)],
24+
- Handle deprecation of `pandas.Series.dt.to_pydatetime()` calls and suppress the `FutureWarning` they currently emit. [[#4379](https://github.com/plotly/plotly.py/pull/4379)]
25+
26+
## [5.17.0] - 2023-09-15
27+
28+
### Updated
29+
- Improved json docstrings, added `BasePlotlyType.to_json()` method [[#4301](https://github.com/plotly/plotly.py/pull/4301)]
30+
- Updated Plotly.js from version 2.25.2 to version 2.26.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2260----2023-08-24) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
31+
- Add "min", "max", "min reversed" and "max reversed" autorange options and handle partial ranges (i.e. one end being null), add `autorangeoptions` (`clipmin`, `clipmax`, `minallowed`, `maxallowed`, `include`) as well as `minallowed` and `maxallowed` to cartesian, gl3d and radial axes [[#6547](https://github.com/plotly/plotly.js/pull/6547)]
32+
- Add [n]-sigma (std deviations) box plots as an alternative to quartiles [[#6697](https://github.com/plotly/plotly.js/issues/6697)], with thanks to @28raining for the contribution!
33+
- Add "top left" & "top center" side options to legend title [[#6711](https://github.com/plotly/plotly.js/pull/6711)], with thanks to @28raining for the contribution!
34+
- Add "false" option to `scaleanchor` to allow removing a constraint that is set by default [[#6712](https://github.com/plotly/plotly.js/pull/6712)], with thanks to @lvlte for the contribution!
35+
36+
37+
### Fixed
38+
- Fixed two issues with px.imshow: [[#4330](https://github.com/plotly/plotly.py/issues/4330)] when facet_col is an earlier dimension than animation_frame for xarrays and [[#4329](https://github.com/plotly/plotly.py/issues/4329)] when facet_col has string coordinates in xarrays [[#4331](https://github.com/plotly/plotly.py/pull/4331)]
39+
40+
## [5.16.1] - 2023-08-16
41+
42+
### Fixed
43+
- Fixed issue with necessary columns from complex arguments dropped when interchanging dataframes [[#4324](https://github.com/plotly/plotly.py/pull/4324)]
44+
45+
## [5.16.0] - 2023-08-11
46+
47+
### Updated
48+
- Updated Plotly.js from version 2.24.1 to version 2.25.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2252----2023-08-11) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
49+
- Add "Equal Earth" projection to geo subplots [[#6670](https://github.com/plotly/plotly.js/pull/6670)],
50+
with thanks to @apparebit for the contribution!
51+
- Add options to include legends for shapes and `newshape` [[#6653](https://github.com/plotly/plotly.js/pull/6653)]
52+
- `px` methods now accept data-frame-like objects that support a [dataframe interchange protocol](https://data-apis.org/dataframe-protocol/latest/index.html), such as polars, vaex, modin etc. This protocol has priority on `to_pandas` call, but will only be used if pandas>=2.0.2 is installed in the environment.
53+
- `px` methods now accept data-frame-like objects that support a `toPandas()` method, such as Spark DataFrames, or a `to_pandas_df()` method, such as Vaex DataFrames.
54+
55+
### Fixed
56+
- Fixed Pandas performance warning issue caused by multiple `frame.insert` [[#4246](https://github.com/plotly/plotly.py/pull/4246)]
57+
58+
## [5.15.0] - 2023-06-08
59+
60+
### Updated
61+
- Updated Plotly.js from version 2.20.0 to version 2.24.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2241----2023-06-07) for more information. Notable changes include:
62+
- Add pattern to pie, funnelarea, sunburst, icicle and treemap traces [[#6601](https://github.com/plotly/plotly.js/pull/6601), [#6619](https://github.com/plotly/plotly.js/pull/6619), [#6622](https://github.com/plotly/plotly.js/pull/6622), [#6626](https://github.com/plotly/plotly.js/pull/6626), [#6627](https://github.com/plotly/plotly.js/pull/6627), [#6628](https://github.com/plotly/plotly.js/pull/6628), [#6629](https://github.com/plotly/plotly.js/pull/6629)], with thanks to @thierryVergult for the contribution!
63+
- Add `texttemplate` to shape.label for parametric shapes i.e. line, rect and circle [[#6527](https://github.com/plotly/plotly.js/pull/6527)],
64+
with thanks to the [Volkswagen](https://www.volkswagenag.com) Center of Excellence for Battery Systems for sponsoring development!
65+
- Add strict option to custom bundle command [[#6557](https://github.com/plotly/plotly.js/pull/6557)],
66+
with thanks to @CallumNZ for the contribution!
67+
- Add `legend` references to traces and `legend2`, `legend3`, etc. to layout,
68+
also add `visible` to legend i.e. to allow positioning multiple legends on a graph [[#6535](https://github.com/plotly/plotly.js/pull/6535)],
69+
this feature was anonymously sponsored: thank you to our sponsor!
70+
- Add `legend.xref` and `legend.yref` to enable container-referenced positioning of legends [[#6589](https://github.com/plotly/plotly.js/pull/6589)], with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
71+
- Add `colorbar.xref` and `colorbar.yref` to enable container-referenced positioning of colorbars [[#6593](https://github.com/plotly/plotly.js/pull/6593)], with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
72+
- `px` methods now accept data-frame-like objects that support a `to_pandas()` method, such as polars, cudf, vaex etc [[#4244](https://github.com/plotly/plotly.py/pull/4244)], [[#4286](https://github.com/plotly/plotly.py/pull/4286)]
73+
74+
### Fixed
75+
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)` [[#4190](https://github.com/plotly/plotly.py/pull/4190)]
76+
- Empty pandas dataframe with facet row/column set no longer fails [[#4038](https://github.com/plotly/plotly.py/pull/4038)]
77+
- Added some rounding to the `make_subplots` function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts [[#4153](https://github.com/plotly/plotly.py/pull/4153)]
78+
- Sanitize JSON output to prevent an XSS vector when graphs are inserted directly into HTML [[#4196](https://github.com/plotly/plotly.py/pull/4196)]
79+
- Fixed issue with shapes and annotations plotting on the wrong y axis when supplied with a specific axis in the `yref` parameter [[#4177](https://github.com/plotly/plotly.py/pull/4177)]
80+
- Remove `use_2to3` setuptools arg, which is invalid in the latest Python and setuptools versions [[#4206](https://github.com/plotly/plotly.py/pull/4206)]
81+
- Fix [#4066](https://github.com/plotly/plotly.py/issues/4066) JupyterLab v4 giving tiny default graph height [[#4227](https://github.com/plotly/plotly.py/pull/4227)]
82+
- Fixed issue with `colors.n_colors` where generated RGB color values were not being constrained to stay between 0 and 255 [[#4110](https://github.com/plotly/plotly.py/pull/4110)]
83+
- Fix streamline figure factory with recent versions of Numpy
84+
- Fix issue with shapes and annotations not drawing on correct axis [[#4177](https://github.com/plotly/plotly.py/pull/4177)]
85+
86+
## [5.14.1] - 2023-04-05
87+
88+
### Fixed
89+
- Fixed compatibility issue with Pandas 2.0 [[#4103](https://github.com/plotly/plotly.py/pull/4103)]
90+
91+
## [5.14.0] - 2023-03-29
92+
93+
### Updated
94+
- Updated Plotly.js from version 2.18.2 to version 2.20.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2200----2023-03-15) for more information. Notable changes include:
95+
- Add `title.automargin` to enable automatic top and bottom margining for both container and paper referenced titles [[#6428](https://github.com/plotly/plotly.js/pull/6428)],
96+
with thanks to [Gamma Technologies](https://www.gtisoft.com/) for sponsoring the related development.
97+
- Add `label` attribute to shapes [[#6454](https://github.com/plotly/plotly.js/pull/6454)], with thanks to the [Volkswagen](https://www.volkswagenag.com) Center of Excellence for Battery Systems for sponsoring development!
98+
- Add `labelalias` to various axes namely cartesian, gl3d, polar, smith, ternary, carpet,
99+
indicator and colorbar [[#6481](https://github.com/plotly/plotly.js/pull/6481)],
100+
this feature was anonymously sponsored: thank you to our sponsor!
101+
- Key errors no longer precalculated when performing updates on plots [[#4101](https://github.com/plotly/plotly.py/pull/4101)]
102+
103+
### Fixed
104+
- Fixed an issue with characters displaying incorrectly, by adding `charset="utf-8"` to scripts in `to_html` [[#4114](https://github.com/plotly/plotly.py/pull/4114)]
105+
- Added `packaging` to install requirements, fixing a `No module named 'packaging` error on Python 3.6 [[#4113](https://github.com/plotly/plotly.py/pull/4113)]
106+
107+
### Added
108+
- Added option to allow passing a column name as a `str` in `hover_data` and `custom_data` in `plotly.express` [[4083](https://github.com/plotly/plotly.py/pull/4083)]
109+
110+
## [5.13.1] - 2023-02-24
111+
112+
### Updated
113+
- Updated Plotly.js to from version 2.18.0 to version 2.18.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2182----2023-02-15) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module.
114+
- Updated distutils.Version to packaging.Version [#3897](https://github.com/plotly/plotly.py/pull/3897)] and [#4055](https://github.com/plotly/plotly.py/pull/4055)]
115+
116+
## [5.13.0] - 2023-01-23
117+
118+
### Updated
119+
- Updated Plotly.js to from version 2.17.1 to version 2.18.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2180----2023-01-19) for more information. Notable changes include:
120+
- Add `sync` tickmode option [[#6356](https://github.com/plotly/plotly.js/pull/6356), [#6443](https://github.com/plotly/plotly.js/pull/6443)], with thanks to @filipesantiagoAM and @VictorBezak for the contribution!
121+
- Build process now uses Node 18.x and version 2 lockfile (should be an invisible change for users) [[#4034](https://github.com/plotly/plotly.py/pull/4034)]
122+
123+
### Fixed
124+
- `write_html()` now explicitly encodes output as UTF-8 because Plotly.js' bundle contains such characters [[#4021](https://github.com/plotly/plotly.py/pull/4021)] and [[#4022](https://github.com/plotly/plotly.py/pull/4022)]
125+
- fixed `iframe` renderer regression from 5.12 and also fixed error when this renderer was used in the very first cell in a notebook [[#4036](https://github.com/plotly/plotly.py/pull/4036)]
126+
127+
128+
## [5.12.0] - 2023-01-12
129+
130+
### Updated
131+
- Support for ipywidgets 8 [[#3930](https://github.com/plotly/plotly.py/pull/3930)]
132+
- Updated Plotly.js to from version 2.16.1 to version 2.17.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2170----2022-12-22) for more information. Notable changes include:
133+
- Add `shift` and `autoshift` to cartesian y axes to help avoid overlapping of multiple axes [[#6334](https://github.com/plotly/plotly.js/pull/6334)],
134+
with thanks to [Gamma Technologies](https://www.gtisoft.com) for sponsoring the related development!
135+
- Introduce group attributes for `scatter` trace i.e. `alignmentgroup`, `offsetgroup`, `scattermode` and `scattergap` [[#6381](https://github.com/plotly/plotly.js/pull/6381)],
136+
this feature was anonymously sponsored: thank you to our sponsor!
137+
- Add `marker.cornerradius` attribute to `treemap` trace [[#6351](https://github.com/plotly/plotly.js/pull/6351)]
138+
### Fixed
139+
- Fixed the usage of some deprecated NumPy types which were removed in NumPy 1.24 [[#3997](https://github.com/plotly/plotly.py/pull/3997)]
140+
- Fixed bug for trendlines with datetime axes [[#3683](https://github.com/plotly/plotly.py/issues/3683)]
141+
- `marker.angle` attribute now accepts iterables where appropriate [[#4013](https://github.com/plotly/plotly.py/issues/4013)]
142+
- `selector=0` now correctly returns the first trace in `.select_traces()` and related methods [[#3817](https://github.com/plotly/plotly.py/issues/3817)]
143+
144+
## [5.11.0] - 2022-10-27
145+
146+
### Updated
147+
- Updated Plotly.js to from version 2.14.0 to version 2.16.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2161----2022-10-21) for more information. Notable changes include:
148+
- Add clustering options to `scattermapbox` [[#5827](https://github.com/plotly/plotly.js/pull/5827)],
149+
with thanks to @elben10 for the contribution!
150+
- Add bounds to mapbox suplots [[6339](https://github.com/plotly/plotly.js/pull/6339)]
151+
- Add `angle`, `angleref` and `standoff` to `marker` and add `backoff` to `line`; also introduce new arrow symbols to facilitate drawing networks [[#6297](https://github.com/plotly/plotly.js/pull/6297)]
152+
- Add `minreducedwidth` and `minreducedheight` to layout for increasing control over automargin [[#6307](https://github.com/plotly/plotly.js/pull/6307)]
153+
- Add `entrywidth` and `entrywidthmode` to legend [[#6202](https://github.com/plotly/plotly.js/pull/6202), [#6324](https://github.com/plotly/plotly.js/pull/6324)]
154+
155+
## [5.10.0] - 2022-08-11
6156

7157
### Updated
8158
- Updated Plotly.js to from version 2.12.1 to version 2.14.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2140----2022-08-10) for more information. Notable changes include:

README.md

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

3434
## Quickstart
3535

36-
`pip install plotly==5.10.0`
36+
`pip install plotly==5.18.0`
3737

3838
Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
3939

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

8080
```
81-
pip install plotly==5.10.0
81+
pip install plotly==5.18.0
8282
```
8383

8484
or conda.
8585

8686
```
87-
conda install -c plotly plotly=5.10.0
87+
conda install -c plotly plotly=5.18.0
8888
```
8989

9090
### JupyterLab Support
@@ -106,7 +106,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**,
106106

107107
```
108108
# JupyterLab 2.x renderer support
109-
jupyter labextension install jupyterlab-plotly@5.10.0 @jupyter-widgets/jupyterlab-manager
109+
jupyter labextension install jupyterlab-plotly@5.18.0 @jupyter-widgets/jupyterlab-manager
110110
```
111111

112112
Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
@@ -200,3 +200,4 @@ Code and documentation copyright 2019 Plotly, Inc.
200200
Code released under the [MIT license](https://github.com/plotly/plotly.py/blob/master/LICENSE.txt).
201201

202202
Docs released under the [Creative Commons license](https://github.com/plotly/documentation/blob/source/LICENSE).
203+

SECURITY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 5.x | :white_check_mark: |
8+
| < 5.0 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
Please email [email protected] with any concerns about security.

binder/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==5.10.0
2+
plotly==5.18.0
33
jupyter
44
notebook
55
pandas==1.0.3

contributing.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ contribution.
99

1010
## Code of Conduct
1111

12-
Please check out the [Code of Conduct](CODE_OF_CONDUCT.md). Don't tl:dr; it,
12+
Please check out the [Code of Conduct](CODE_OF_CONDUCT.md). Don't skip it,
1313
but the general idea is to be nice.
1414

1515
## What are the different ways to contribute?
1616

17-
There are many ways to contribute to plotly.py. It helps to understand first
18-
the structure of the code and of the repository.
17+
There are many ways to contribute to plotly.py. To contribute effectively, it is important to first gain an understanding of the structure of the code and of the repository.
1918

2019
- [the `plotly.graph_objects` module](https://plotly.com/python/graph-objects/) (usually imported as `go`)
2120
is [generated from the Plotly.js schema](https://plotly.com/python/figure-structure/),
@@ -272,11 +271,11 @@ pytest plotly/tests/test_plotly/test_plot.py::test_function
272271

273272
Running tests with tox is much more powerful, but requires a bit more setup.
274273

275-
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 2.7` and
274+
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 3.9` and
276275
`Python 3.6`, but only care to check the `core` specs, you would need to ensure that the following variables are exported:
277276

278277
```
279-
export PLOTLY_TOX_PYTHON_27=<python binary>
278+
export PLOTLY_TOX_PYTHON_39=<python binary>
280279
export PLOTLY_TOX_PYTHON_36=<python binary>
281280
```
282281

@@ -287,15 +286,15 @@ Where the `<python binary` is going to be specific to your development setup. As
287286
# tox envs #
288287
############
289288

290-
export PLOTLY_TOX_PYTHON_27=python2.7
291-
export PLOTLY_TOX_PYTHON_34=python3.4
292-
export TOXENV=py27-core,py34-core
289+
export PLOTLY_TOX_PYTHON_39=python3.9
290+
export PLOTLY_TOX_PYTHON_36=python3.6
291+
export TOXENV=py39-core,py36-core
293292
```
294293

295294
Where `TOXENV` is the environment list you want to use when invoking `tox` from the command line. Note that the `PLOTLY_TOX_*` pattern is used to pass in variables for use in the `tox.ini` file. Though this is a little setup, intensive, you'll get the following benefits:
296295

297296
* `tox` will automatically manage a virtual env for each environment you want to test in.
298-
* You only have to run `tox` and know that the module is working in both `Python 2` and `Python 3`.
297+
* You only have to run `tox` and know that the module is working in all included Python versions.
299298

300299
Finally, `tox` allows you to pass in additional command line arguments that are formatted in (by us) in the `tox.ini` file, see `{posargs}`. This is setup to help with our configuration of [pytest markers](http://doc.pytest.org/en/latest/example/markers.html), which are set up in `packages/python/plotly/pytest.ini`. To run only tests that are *not* tagged with `nodev`, you could use the following command:
301300

0 commit comments

Comments
 (0)