Skip to content

Commit 9b3b592

Browse files
committed
Merge branch 'master' into autorange-bounds
2 parents 31034e3 + 975a704 commit 9b3b592

File tree

316 files changed

+6713
-2440
lines changed

Some content is hidden

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

316 files changed

+6713
-2440
lines changed

.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

CHANGELOG.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,31 @@
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-
65
## UNRELEASED
76

87
### Updated
9-
- Updated Plotly.js from version 2.24.1 to version 2.24.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2242----2023-06-09) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module.
8+
- Improved json docstrings, added `BasePlotlyType.to_json()` method [[#4301](https://github.com/plotly/plotly.py/pull/4301)]
9+
10+
### Fixed
11+
- 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)]
12+
13+
## [5.16.1] - 2023-08-16
14+
15+
### Fixed
16+
- Fixed issue with necessary columns from complex arguments dropped when interchanging dataframes [[#4324](https://github.com/plotly/plotly.py/pull/4324)]
17+
18+
## [5.16.0] - 2023-08-11
19+
20+
### Updated
21+
- 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:
22+
- Add "Equal Earth" projection to geo subplots [[#6670](https://github.com/plotly/plotly.js/pull/6670)],
23+
with thanks to @apparebit for the contribution!
24+
- Add options to include legends for shapes and `newshape` [[#6653](https://github.com/plotly/plotly.js/pull/6653)]
1025
- `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.
26+
- `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.
27+
28+
### Fixed
29+
- Fixed Pandas performance warning issue caused by multiple `frame.insert` [[#4246](https://github.com/plotly/plotly.py/pull/4246)]
1130

1231
## [5.15.0] - 2023-06-08
1332

@@ -23,7 +42,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2342
this feature was anonymously sponsored: thank you to our sponsor!
2443
- 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.
2544
- 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.
26-
- `px` methods now accept data-frame-like objects that support a `to_pandas()` method, such as polars, cudf, vaex etc
45+
- `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)]
2746

2847
### Fixed
2948
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)` [[#4190](https://github.com/plotly/plotly.py/pull/4190)]

README.md

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

3434
## Quickstart
3535

36-
`pip install plotly==5.15.0`
36+
`pip install plotly==5.16.1`
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.15.0
81+
pip install plotly==5.16.1
8282
```
8383

8484
or conda.
8585

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

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.15.0
2+
plotly==5.16.1
33
jupyter
44
notebook
55
pandas==1.0.3

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 = "5.15.0"
31+
release = "5.16.1"
3232

3333

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

doc/python/3d-scatter-plots.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ fig = px.scatter_3d(df, x='sepal_length', y='sepal_width', z='petal_width',
7070

7171
# tight layout
7272
fig.update_layout(margin=dict(l=0, r=0, b=0, t=0))
73+
fig.show()
7374
```
7475

7576
#### 3d scatter plots in Dash

doc/python/animations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jupyter:
3737

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

40-
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.
40+
Here is an example of an animated scatter plot created with Plotly Express. Note that you should always fix the `x_range` and `y_range` to ensure that your data remains visible throughout the animation.
4141

4242
```python
4343
import plotly.express as px

doc/python/axes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jupyter:
3333
thumbnail: thumbnail/axes.png
3434
---
3535

36-
This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](python/reference/layout/xaxis/).
36+
This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](/python/reference/layout/xaxis/).
3737

3838
Other kinds of subplots and axes are described in other tutorials:
3939

@@ -154,7 +154,7 @@ fig.update_yaxes(ticklabelposition="inside top", title=None)
154154
fig.show()
155155
```
156156

157-
#### Specifying Label Aliases
157+
#### Specifying Label Aliases
158158

159159
*New in 5.14*
160160

doc/python/colorscales.md

Lines changed: 4 additions & 4 deletions
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.14.5
9+
jupytext_version: 1.14.6
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.11
23+
version: 3.10.8
2424
plotly:
2525
description: How to set, create and control continuous color scales and color
2626
bars in scatter, bar, map and heatmap figures.
@@ -307,11 +307,11 @@ Using `labelalias` you can replace some labels on the `colorbar` with alternativ
307307
```python
308308
import plotly.graph_objects as go
309309

310-
import urllib
310+
import urllib.request as request
311311
import json
312312

313313
# Load heatmap data
314-
response = urllib.request.urlopen(
314+
response = request.urlopen(
315315
"https://raw.githubusercontent.com/plotly/datasets/master/custom_heatmap_colorscale.json")
316316
dataset = json.load(response)
317317

doc/python/configuration-options.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import plotly.graph_objects as go
5353

5454
fig = go.Figure()
5555

56-
config = dict({'scrollZoom': True})
56+
config = {'scrollZoom': True}
5757

5858
fig.add_trace(
5959
go.Scatter(
@@ -244,6 +244,8 @@ fig.add_trace(
244244
y=[1, 3, 1]))
245245

246246
fig.update_layout(modebar_remove=['zoom', 'pan'])
247+
248+
fig.show()
247249
```
248250

249251
### Add optional shape-drawing buttons to modebar
@@ -253,16 +255,19 @@ fig.update_layout(modebar_remove=['zoom', 'pan'])
253255
Some modebar buttons of Cartesian plots are optional and have to be added explicitly, using the `modeBarButtonsToAdd` config attribute. These buttons are used for drawing or erasing shapes. See [the tutorial on shapes and shape drawing](python/shapes#drawing-shapes-on-cartesian-plots) for more details.
254256

255257
```python
256-
import plotly.graph_objects as go
257258
import plotly.express as px
259+
258260
df = px.data.iris()
261+
259262
fig = px.scatter(df, x='petal_width', y='sepal_length', color='species')
263+
260264
fig.update_layout(
261265
dragmode='drawopenpath',
262266
newshape_line_color='cyan',
263267
title_text='Draw a path to separate versicolor and virginica'
264268
)
265-
fig.show(config={'modeBarButtonsToAdd':['drawline',
269+
270+
fig.show(config={'modeBarButtonsToAdd': ['drawline',
266271
'drawopenpath',
267272
'drawclosedpath',
268273
'drawcircle',
@@ -276,10 +281,12 @@ fig.show(config={'modeBarButtonsToAdd':['drawline',
276281
The `layout.modebar.add` attribute can be used instead of the approach used above:
277282

278283
```python
279-
import plotly.graph_objects as go
280284
import plotly.express as px
285+
281286
df = px.data.iris()
287+
282288
fig = px.scatter(df, x='petal_width', y='sepal_length', color='species')
289+
283290
fig.update_layout(
284291
dragmode='drawopenpath',
285292
newshape_line_color='cyan',
@@ -292,6 +299,8 @@ fig.update_layout(
292299
'eraseshape'
293300
]
294301
)
302+
303+
fig.show()
295304
```
296305

297306
### Double-Click Delay
@@ -304,12 +313,12 @@ import plotly.graph_objects as go
304313
config = {'doubleClickDelay': 1000}
305314

306315
fig = go.Figure(go.Bar(
307-
y = [3, 5, 3, 2],
308-
x = ["2019-09-02", "2019-10-10", "2019-11-12", "2019-12-22"],
309-
texttemplate = "%{label}",
310-
textposition = "inside"))
316+
y=[3, 5, 3, 2],
317+
x=["2019-09-02", "2019-10-10", "2019-11-12", "2019-12-22"],
318+
texttemplate="%{label}",
319+
textposition="inside"))
311320

312-
fig.update_layout(xaxis = {'type': 'date'})
321+
fig.update_layout(xaxis={'type': 'date'})
313322

314323
fig.show(config=config)
315324
```
@@ -320,4 +329,4 @@ The same configuration dictionary that you pass to the `config` parameter of the
320329

321330
#### Reference
322331

323-
See config options at https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L6
332+
See config options at https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js

doc/python/figure-factory-subplots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Y, X = np.meshgrid(x, y)
6161
u = -1 - X**2 + Y
6262
v = 1 + X - Y**2
6363

64-
fig2 = ff.create_streamline(x, y, u, v, arrow_scale=.1, name='Steamline')
64+
fig2 = ff.create_streamline(x, y, u, v, arrow_scale=.1, name='Streamline')
6565
```
6666

6767
Edit the figures' x and y axes attributes to create subplots:

doc/python/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ We also encourage you to join the [Plotly Community Forum](http://community.plot
5858
`plotly` may be installed using `pip`:
5959

6060
```
61-
$ pip install plotly==5.15.0
61+
$ pip install plotly==5.16.1
6262
```
6363

6464
or `conda`:
6565

6666
```
67-
$ conda install -c plotly plotly=5.15.0
67+
$ conda install -c plotly plotly=5.16.1
6868
```
6969
This package contains everything you need to write figures to standalone HTML files.
7070

@@ -152,7 +152,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**,
152152

153153
```
154154
# JupyterLab 2.x renderer support
155-
jupyter labextension install jupyterlab-plotly@5.15.0 @jupyter-widgets/jupyterlab-manager
155+
jupyter labextension install jupyterlab-plotly@5.16.1 @jupyter-widgets/jupyterlab-manager
156156
```
157157

158158
Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter.

doc/python/imshow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This tutorial shows how to display and explore image data. If you would like
4040
instead a logo or static image, use `go.layout.Image` as explained
4141
[here](/python/images).
4242

43-
### Displaying RBG image data with px.imshow
43+
### Displaying RGB image data with px.imshow
4444

4545
`px.imshow` displays multichannel (RGB) or single-channel ("grayscale") image data.
4646

doc/python/interactive-html-export.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Any figure can be saved as an HTML file using the `write_html` method. These HTM
4646
```python
4747
import plotly.express as px
4848

49-
fig =px.scatter(x=range(10), y=range(10))
49+
fig = px.scatter(x=range(10), y=range(10))
5050
fig.write_html("path/to/file.html")
5151
```
5252
<!-- #endregion -->

0 commit comments

Comments
 (0)