Skip to content

Commit b37a559

Browse files
authored
Merge branch 'master' into merge-doc-prod-updates
2 parents 5496d36 + 5bac931 commit b37a559

File tree

90 files changed

+1423
-307
lines changed

Some content is hidden

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

90 files changed

+1423
-307
lines changed

Diff for: .circleci/config.yml

+55-38
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ commands:
77
test_core:
88
parameters:
99
py:
10-
default: "36"
10+
default: "310"
1111
type: string
1212
steps:
1313
- checkout
@@ -32,7 +32,7 @@ commands:
3232
test_optional:
3333
parameters:
3434
py:
35-
default: "36"
35+
default: "310"
3636
type: string
3737
steps:
3838
- checkout
@@ -95,7 +95,7 @@ commands:
9595
test_orca:
9696
parameters:
9797
py:
98-
default: "36"
98+
default: "310"
9999
type: string
100100
steps:
101101
- checkout
@@ -153,20 +153,6 @@ jobs:
153153
black --check . --exclude venv
154154
155155
# Core
156-
python_36_core:
157-
docker:
158-
- image: cimg/python:3.6-browsers
159-
steps:
160-
- test_core:
161-
py: "36"
162-
163-
python_37_core:
164-
docker:
165-
- image: cimg/python:3.7-browsers
166-
steps:
167-
- test_core:
168-
py: "37"
169-
170156
python_38_core:
171157
docker:
172158
- image: cimg/python:3.8-browsers
@@ -181,20 +167,28 @@ jobs:
181167
- test_core:
182168
py: "39"
183169

184-
# Optional
185-
python_36_optional:
170+
python_310_core:
186171
docker:
187-
- image: cimg/python:3.6-browsers
172+
- image: cimg/python:3.10-browsers
188173
steps:
189-
- test_optional:
190-
py: "36"
174+
- test_core:
175+
py: "310"
191176

192-
python_37_optional:
177+
python_311_core:
193178
docker:
194-
- image: cimg/python:3.7-browsers
179+
- image: cimg/python:3.11-browsers
195180
steps:
196-
- test_optional:
197-
py: "37"
181+
- test_core:
182+
py: "311"
183+
184+
python_312_core:
185+
docker:
186+
- image: cimg/python:3.12-browsers
187+
steps:
188+
- test_core:
189+
py: "312"
190+
191+
# Optional
198192

199193
python_38_optional:
200194
docker:
@@ -210,6 +204,27 @@ jobs:
210204
- test_optional:
211205
py: "39"
212206

207+
python_310_optional:
208+
docker:
209+
- image: cimg/python:3.10-browsers
210+
steps:
211+
- test_optional:
212+
py: "310"
213+
214+
python_311_optional:
215+
docker:
216+
- image: cimg/python:3.11-browsers
217+
steps:
218+
- test_optional:
219+
py: "311"
220+
221+
python_312_optional:
222+
docker:
223+
- image: cimg/python:3.12-browsers
224+
steps:
225+
- test_optional:
226+
py: "312"
227+
213228
# Pandas
214229

215230
python_39_pandas_2_optional:
@@ -228,7 +243,7 @@ jobs:
228243
py: "38"
229244

230245
# Percy
231-
python_37_percy:
246+
python_39_percy:
232247
docker:
233248
- image: cimg/python:3.9-browsers
234249
environment:
@@ -277,9 +292,9 @@ jobs:
277292
rm test/percy/*.html
278293
279294
# Chart studio
280-
python_37_chart_studio:
295+
python_38_chart_studio:
281296
docker:
282-
- image: cimg/python:3.7
297+
- image: cimg/python:3.8
283298
resource_class: large
284299

285300
steps:
@@ -291,7 +306,7 @@ jobs:
291306
python -m venv venv
292307
. venv/bin/activate
293308
pip install --upgrade pip wheel
294-
pip install -r ./test_requirements/requirements_37.txt
309+
pip install -r ./test_requirements/requirements_38.txt
295310
- run:
296311
name: Tests
297312
command: |
@@ -302,7 +317,7 @@ jobs:
302317

303318
plotlyjs_dev_build:
304319
docker:
305-
- image: cimg/python:3.7-node
320+
- image: cimg/python:3.8-node
306321
environment:
307322
LANG: en_US.UTF-8
308323
resource_class: large
@@ -316,7 +331,7 @@ jobs:
316331
python -m venv venv
317332
. venv/bin/activate
318333
pip install --upgrade pip wheel
319-
pip install -r ./test_requirements/requirements_37_core.txt black inflect
334+
pip install -r ./test_requirements/requirements_38_core.txt black inflect
320335
pip install jupyterlab~=3.0
321336
- run:
322337
name: Update jupyterlab-plotly version
@@ -433,7 +448,7 @@ jobs:
433448
docker:
434449
# specify the version you desire here
435450
# use `-browsers` prefix for selenium tests, for example, `3.6.1-browsers`
436-
- image: cimg/python:3.7-browsers
451+
- image: cimg/python:3.9-browsers
437452

438453
steps:
439454
- add_ssh_keys:
@@ -570,15 +585,17 @@ workflows:
570585

571586
build:
572587
jobs:
573-
- python_36_core
574-
- python_37_core
575588
- python_38_core
576589
- python_39_core
577-
- python_36_optional
578-
- python_37_optional
590+
- python_310_core
591+
- python_311_core
592+
- python_312_core
579593
- python_38_optional
580594
- python_39_optional
595+
- python_310_optional
596+
- python_311_optional
597+
- python_312_optional
581598
- python_39_pandas_2_optional
582599
- python_38_orca
583-
- python_37_percy
600+
- python_39_percy
584601
- build-doc

Diff for: .gitignore

+7
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

Diff for: CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
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.19.0] - 2024-02-15
6+
7+
### Updated
8+
9+
- Updated Plotly.js from version 2.27.0 to version 2.29.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2291----2024-02-12) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
10+
- Add `layout.barcornerradius` and `trace.marker.cornerradius` properties to support rounding the corners of bar traces [[#6761](https://github.com/plotly/plotly.js/pull/6761)],
11+
with thanks to [Displayr](https://www.displayr.com) for sponsoring development!
12+
- Add `autotickangles` to cartesian and radial axes [[#6790](https://github.com/plotly/plotly.js/pull/6790)], with thanks to @my-tien for the contribution!
13+
- Add `align` option to sankey nodes to control horizontal alignment [[#6800](https://github.com/plotly/plotly.js/pull/6800)],
14+
with thanks to @adamreeve for the contribution!
15+
- Add the possibility of loading "virtual-webgl" script for WebGL 1 to help display several WebGL contexts on a page [[#6784](https://github.com/plotly/plotly.js/pull/6784)], with thanks to @greggman for the contribution!
16+
- Add options to use base64 encoding (`bdata`) and `shape` (for 2 dimensional arrays) to declare various typed arrays i.e. `dtype=(float64|float32|int32|int16|int8|uint32|uint16|uint8)` [[#5230](https://github.com/plotly/plotly.js/pull/5230)]
17+
- Adjust stamen styles to point to `stadiamaps.com`, the users may also need to provide their own API_KEY via `config.mapboxAccessToken` [[#6776](https://github.com/plotly/plotly.js/pull/6776), [#6778](https://github.com/plotly/plotly.js/pull/6778)]
18+
- Removed Python 3.6 and Python 3.7 support [[#4492](https://github.com/plotly/plotly.py/pull/4492)]
19+
20+
### Fixed
21+
- Ensure scatter `mode` is deterministic from `px` [[#4429](https://github.com/plotly/plotly.py/pull/4429)]
22+
- Fix issue with creating dendrogram in subplots [[#4411](https://github.com/plotly/plotly.py/pull/4411)],
23+
- Fix issue with px.line not accepting "spline" line shape [[#2812](https://github.com/plotly/plotly.py/issues/2812)]
24+
- Fix KeyError when using column of `pd.Categorical` dtype with unobserved categories [[#4437](https://github.com/plotly/plotly.py/pull/4437)]
25+
- Fix dataframe interchange in case `column_names` returns an unmaterialized object: generator, iterator, etc. [[#4442]](https://github.com/plotly/plotly.py/pull/4442)
26+
- Fix issue with `FutureWarning` being displayed when setting the `color` argument in `plotly.express` [[#4519]](https://github.com/plotly/plotly.py/pull/4519)
27+
528
## [5.18.0] - 2023-10-25
629

730
### Updated

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
## Quickstart
3535

36-
`pip install plotly==5.18.0`
36+
`pip install plotly==5.19.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.18.0
81+
pip install plotly==5.19.0
8282
```
8383

8484
or conda.
8585

8686
```
87-
conda install -c plotly plotly=5.18.0
87+
conda install -c plotly plotly=5.19.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.18.0 @jupyter-widgets/jupyterlab-manager
109+
jupyter labextension install jupyterlab-plotly@5.19.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.

Diff for: binder/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ jupytext
22
plotly==5.18.0
33
jupyter
44
notebook
5-
pandas==1.0.3
6-
statsmodels==0.11.1
5+
pandas==1.2.0
6+
statsmodels==0.12.1
77
scipy
88
patsy==0.5.1
99
numpy

Diff for: doc/python/LaTeX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jupyter:
3535

3636
#### LaTeX Typesetting
3737

38-
Figure titles, axis labels and annotations all accept LaTeX directives for rendering mathematical formulas and notation, when the entire label is surrounded by dollar signs `$...$`. This rendering is handled by the [MathJax library](https://www.mathjax.org/) (version 2.7.5), which must be loaded in the environment where figures are being rendered. MathJax is included by default in Jupyter-like environments, but when embedding Plotly figures in other contexts it may be required to ensure that MathJax is separately loaded, for example via a `<script>` tag pointing to a content-delivery network (CDN).
38+
Figure titles, axis labels and annotations all accept LaTeX directives for rendering mathematical formulas and notation, when the entire label is surrounded by dollar signs `$...$`. This rendering is handled by the [MathJax library](https://www.mathjax.org/) (version 2.7.5), which must be loaded in the environment where figures are being rendered. MathJax is included by default in Jupyter-like environments, and LateX directives work with Jupyter Notebook version 6. LaTeX directives do not work with Jupyter Notebook version 7. When embedding Plotly figures in other contexts it may be required to ensure that MathJax is separately loaded, for example via a `<script>` tag pointing to a content-delivery network (CDN).
3939

4040
```python
4141
import plotly.express as px

Diff for: doc/python/axes.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.15.1
9+
jupytext_version: 1.16.1
1010
kernelspec:
1111
display_name: Python 3 (ipykernel)
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.10.4
23+
version: 3.10.11
2424
plotly:
2525
description: How to adjust axes properties in Python - axes titles, styling and
2626
coloring axes and grid lines, ticks, tick labels and more.
@@ -363,6 +363,23 @@ fig.update_xaxes(tickangle=45, tickfont=dict(family='Rockwell', color='crimson',
363363
fig.show()
364364
```
365365

366+
##### Auto Tick Angle Options
367+
368+
*New in 5.19*
369+
370+
If `tickangle` is not explicitly set, its default value is `auto`, meaning if the label needs to be rotated to avoid labels overlapping, it will rotate by either 30 or 90 degrees. Using `autotickangles`, you can also specify a list of angles for `tickangle` to use. If `tickangle` is `auto` and you provide a list of angles to `autotickangles`, the label angle will be set to the first value in the list that prevents overlap.
371+
372+
```python
373+
import plotly.express as px
374+
df = px.data.gapminder()
375+
df = df.loc[(df.continent=="Asia") & (df.year==1992)]
376+
fig = px.histogram(df, x=df.country, y=df.gdpPercap)
377+
378+
fig.update_xaxes(autotickangles=[45, 60, 90])
379+
380+
fig.show()
381+
```
382+
366383
#### Enumerated Ticks with Tickvals and Ticktext
367384

368385
The `tickvals` and `ticktext` axis properties can be used together to display custom tick label text at custom locations along an axis. They should be set to lists of the same length where the `tickvals` list contains positions along the axis, and `ticktext` contains the strings that should be displayed at the corresponding positions.

0 commit comments

Comments
 (0)