Skip to content

Commit 85ac208

Browse files
authored
Merge branch 'master' into move-chart-studio-and-plotly-geo
2 parents 989e974 + 5e079e1 commit 85ac208

Some content is hidden

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

60 files changed

+518
-400
lines changed

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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.0rc0] - 2024-11-27
5+
## [6.0.0] - 2025-01-28
66

77
### Added
88
- Add `plotly[express]` extra for easily installing Plotly Express dependencies [[#4644](https://github.com/plotly/plotly.py/pull/4644)]
@@ -14,12 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1414
- 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.
1515

1616
### Updated
17-
- 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.
18-
- 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)].
19-
- Make plotly-express dataframe agnostic via Narwhals [[#4790](https://github.com/plotly/plotly.py/pull/4790)].
20-
- Update `go.FigureWidget` to use `anywidget` [[#4823](https://github.com/plotly/plotly.py/pull/4823)]
21-
- 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)]
22-
- Update Plotly.js from version 2.34.2 to version 3.0.0-rc1 See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#300-rc1----2024-11-27) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
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:
2318
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
2419
- Drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` [[#7212](https://github.com/plotly/plotly.js/pull/7212)].
2520
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
@@ -31,6 +26,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3126
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
3227
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
3328
- 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)]
3434

3535
### Fixed
3636
- 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)].

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
## Quickstart
4141

42-
`pip install plotly==6.0.0rc0`
42+
`pip install plotly`
4343

4444
```python
4545
import plotly.express as px
@@ -79,13 +79,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
7979
plotly.py may be installed using pip
8080

8181
```
82-
pip install plotly==6.0.0rc0
82+
pip install plotly
8383
```
8484

8585
or conda.
8686

8787
```
88-
conda install -c plotly plotly=6.0.0rc0
88+
conda install -c plotly plotly
8989
```
9090

9191
### Jupyter Widget Support

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.24.1
2+
plotly==6.0.0
33
jupyter
44
notebook
55
pandas==2.2.2

doc/apidoc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ""
2828
# The full version, including alpha/beta/rc tags
29-
release = "5.24.1"
29+
release = "6.0.0"
3030

3131

3232
# -- General configuration ---------------------------------------------------

doc/nb.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
---
88
{{ super() }}
99
{{ '{% raw %}' }}
10-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.js"></script>
1110

1211
{%- endblock header-%}
1312

doc/python/3d-axes.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,22 @@ fig.add_trace(go.Mesh3d(x=(70*np.random.randn(N)),
159159
))
160160

161161
fig.update_layout(scene = dict(
162-
xaxis_title='X AXIS TITLE',
163-
yaxis_title='Y AXIS TITLE',
164-
zaxis_title='Z AXIS TITLE'),
162+
xaxis=dict(
163+
title=dict(
164+
text='X AXIS TITLE'
165+
)
166+
),
167+
yaxis=dict(
168+
title=dict(
169+
text='Y AXIS TITLE'
170+
)
171+
),
172+
zaxis=dict(
173+
title=dict(
174+
text='Z AXIS TITLE'
175+
)
176+
),
177+
),
165178
width=700,
166179
margin=dict(r=20, b=10, l=10, t=10))
167180

doc/python/3d-bubble-charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fig = go.Figure(data=go.Scatter3d(
7777

7878

7979
fig.update_layout(height=800, width=800,
80-
title='Examining Population and Life Expectancy Over Time')
80+
title=dict(text='Examining Population and Life Expectancy Over Time'))
8181

8282
fig.show()
8383
```
@@ -116,7 +116,7 @@ fig = go.Figure(data=go.Scatter3d(
116116
fig.update_layout(
117117
width=800,
118118
height=800,
119-
title="Planets!",
119+
title=dict(text="Planets!"),
120120
scene=dict(
121121
xaxis=dict(
122122
title=dict(
@@ -183,7 +183,7 @@ fig = go.Figure(go.Scatter3d(
183183
fig.update_layout(
184184
width=800,
185185
height=800,
186-
title="Planets!",
186+
title=dict(text="Planets!"),
187187
scene=dict(
188188
xaxis=dict(
189189
title=dict(

doc/python/3d-camera-controls.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
5353

5454
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
5555
fig.update_layout(
56-
title='Mt Bruno Elevation',
56+
title=dict(text='Mt Bruno Elevation'),
5757
width=400, height=400,
5858
margin=dict(t=40, r=0, l=20, b=20)
5959
)
@@ -85,7 +85,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
8585

8686
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
8787
fig.update_layout(
88-
title='Mt Bruno Elevation',
88+
title=dict(text='Mt Bruno Elevation'),
8989
width=400, height=400,
9090
margin=dict(t=30, r=0, l=20, b=10)
9191
)
@@ -112,7 +112,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
112112

113113
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
114114
fig.update_layout(
115-
title='Mt Bruno Elevation',
115+
title=dict(text='Mt Bruno Elevation'),
116116
width=400, height=400,
117117
margin=dict(t=30, r=0, l=20, b=10)
118118
)
@@ -138,7 +138,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
138138

139139
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
140140
fig.update_layout(
141-
title='Mt Bruno Elevation',
141+
title=dict(text='Mt Bruno Elevation'),
142142
width=400, height=400,
143143
margin=dict(t=30, r=0, l=20, b=10)
144144
)
@@ -163,7 +163,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
163163

164164
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
165165
fig.update_layout(
166-
title='Mt Bruno Elevation',
166+
title=dict(text='Mt Bruno Elevation'),
167167
width=400, height=400,
168168
margin=dict(t=30, r=0, l=20, b=10)
169169
)
@@ -189,7 +189,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
189189

190190
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
191191
fig.update_layout(
192-
title='Mt Bruno Elevation',
192+
title=dict(text='Mt Bruno Elevation'),
193193
width=400, height=400,
194194
margin=dict(t=30, r=0, l=20, b=10)
195195
)
@@ -216,7 +216,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
216216

217217
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
218218
fig.update_layout(
219-
title='Mt Bruno Elevation',
219+
title=dict(text='Mt Bruno Elevation'),
220220
width=400, height=400,
221221
margin=dict(t=30, r=0, l=20, b=10)
222222
)
@@ -243,7 +243,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
243243

244244
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
245245
fig.update_layout(
246-
title='Mt Bruno Elevation',
246+
title=dict(text='Mt Bruno Elevation'),
247247
width=400, height=400,
248248
margin=dict(t=30, r=0, l=20, b=10)
249249
)
@@ -273,7 +273,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
273273

274274
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
275275
fig.update_layout(
276-
title='Mt Bruno Elevation',
276+
title=dict(text='Mt Bruno Elevation'),
277277
width=400, height=400,
278278
margin=dict(t=25, r=0, l=20, b=30)
279279
)

doc/python/3d-mesh.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fig = go.Figure(data=[
9797
x=[0, 1, 2, 0],
9898
y=[0, 0, 1, 2],
9999
z=[0, 2, 0, 1],
100-
colorbar_title='z',
100+
colorbar=dict(title=dict(text='z')),
101101
colorscale=[[0, 'gold'],
102102
[0.5, 'mediumturquoise'],
103103
[1, 'magenta']],
@@ -128,7 +128,7 @@ fig = go.Figure(data=[
128128
x=[0, 0, 1, 1, 0, 0, 1, 1],
129129
y=[0, 1, 1, 0, 0, 1, 1, 0],
130130
z=[0, 0, 0, 0, 1, 1, 1, 1],
131-
colorbar_title='z',
131+
colorbar=dict(title=dict(text='z')),
132132
colorscale=[[0, 'gold'],
133133
[0.5, 'mediumturquoise'],
134134
[1, 'magenta']],
@@ -160,7 +160,7 @@ fig = go.Figure(data=[
160160
x=[0, 0, 1, 1, 0, 0, 1, 1],
161161
y=[0, 1, 1, 0, 0, 1, 1, 0],
162162
z=[0, 0, 0, 0, 1, 1, 1, 1],
163-
colorbar_title='z',
163+
colorbar=dict(title=dict(text='z')),
164164
colorscale=[[0, 'gold'],
165165
[0.5, 'mediumturquoise'],
166166
[1, 'magenta']],

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
4646

4747
fig = go.Figure(data=[go.Surface(z=z_data.values)])
4848

49-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
49+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
5050
width=500, height=500,
5151
margin=dict(l=65, r=50, b=65, t=90))
5252

@@ -67,7 +67,7 @@ z = z_data.values
6767
sh_0, sh_1 = z.shape
6868
x, y = np.linspace(0, 1, sh_0), np.linspace(0, 1, sh_1)
6969
fig = go.Figure(data=[go.Surface(z=z, x=x, y=y)])
70-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
70+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
7171
width=500, height=500,
7272
margin=dict(l=65, r=50, b=65, t=90))
7373
fig.show()
@@ -90,7 +90,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
9090
fig = go.Figure(data=[go.Surface(z=z_data.values)])
9191
fig.update_traces(contours_z=dict(show=True, usecolormap=True,
9292
highlightcolor="limegreen", project_z=True))
93-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
93+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
9494
scene_camera_eye=dict(x=1.87, y=0.88, z=-0.64),
9595
width=500, height=500,
9696
margin=dict(l=65, r=50, b=65, t=90)

doc/python/animations.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jupyter:
3030
order: 1
3131
page_type: example_index
3232
permalink: python/animations/
33+
redirect_from: python/visualizing-mri-volume-slices/
3334
thumbnail: thumbnail/animations.gif
3435
---
3536

@@ -125,7 +126,7 @@ fig = go.Figure(
125126
layout=go.Layout(
126127
xaxis=dict(range=[0, 5], autorange=False),
127128
yaxis=dict(range=[0, 5], autorange=False),
128-
title="Start Title",
129+
title=dict(text="Start Title"),
129130
updatemenus=[dict(
130131
type="buttons",
131132
buttons=[dict(label="Play",
@@ -171,17 +172,17 @@ fig = go.Figure(
171172
fig.update_layout(width=600, height=450,
172173
xaxis=dict(range=[xm, xM], autorange=False, zeroline=False),
173174
yaxis=dict(range=[ym, yM], autorange=False, zeroline=False),
174-
title_text="Kinematic Generation of a Planar Curve", title_x=0.5,
175+
title_text="Kinematic Generation of a Planar Curve", title_x=0.5,
175176
updatemenus = [dict(type = "buttons",
176177
buttons = [
177178
dict(
178179
args = [None, {"frame": {"duration": 10, "redraw": False},
179180
"fromcurrent": True, "transition": {"duration": 10}}],
180181
label = "Play",
181182
method = "animate",
182-
183+
183184
)])])
184-
185+
185186
fig.update(frames=[go.Frame(
186187
data=[go.Scatter(
187188
x=[xx[k]],
@@ -239,7 +240,7 @@ fig = go.Figure(
239240
layout=go.Layout(width=600, height=600,
240241
xaxis=dict(range=[xm, xM], autorange=False, zeroline=False),
241242
yaxis=dict(range=[ym, yM], autorange=False, zeroline=False),
242-
title="Moving Frenet Frame Along a Planar Curve",
243+
title=dict(text="Moving Frenet Frame Along a Planar Curve"),
243244
hovermode="closest",
244245
updatemenus=[dict(type="buttons",
245246
buttons=[dict(label="Play",

doc/python/axes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ import plotly.express as px
649649
df = px.data.stocks(indexed=True)
650650

651651
fig = px.line(df, df.index, y="GOOG")
652-
fig.update_yaxes(ticklabelposition="inside", title="Price")
653-
fig.update_xaxes(insiderange=['2018-10-01', '2019-01-01'], title="Date")
652+
fig.update_yaxes(ticklabelposition="inside", title=dict(text="Price"))
653+
fig.update_xaxes(insiderange=['2018-10-01', '2019-01-01'], title=dict(text="Date"))
654654

655655
fig.show()
656656
```

doc/python/bar-charts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ fig.add_trace(go.Bar(x=years,
693693
))
694694

695695
fig.update_layout(
696-
title='US Export of Plastic Scrap',
696+
title=dict(text='US Export of Plastic Scrap'),
697697
xaxis_tickfont_size=14,
698698
yaxis=dict(
699699
title=dict(

doc/python/box-plots.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ fig.add_trace(go.Box(
367367
))
368368

369369
fig.update_layout(
370-
yaxis_title='normalized moisture',
370+
yaxis=dict(
371+
title=dict(
372+
text='normalized moisture')
373+
),
371374
boxmode='group' # group together boxes of the different traces for each value of x
372375
)
373376
fig.show()
@@ -402,7 +405,7 @@ fig.add_trace(go.Box(
402405
))
403406

404407
fig.update_layout(
405-
xaxis=dict(title='normalized moisture', zeroline=False),
408+
xaxis=dict(title=dict(text='normalized moisture'), zeroline=False),
406409
boxmode='group'
407410
)
408411

@@ -479,7 +482,7 @@ for xd, yd, cls in zip(x_data, y_data, colors):
479482
)
480483

481484
fig.update_layout(
482-
title='Points Scored by the Top 9 Scoring NBA Players in 2012',
485+
title=dict(text='Points Scored by the Top 9 Scoring NBA Players in 2012'),
483486
yaxis=dict(
484487
autorange=True,
485488
showgrid=True,

doc/python/bubble-charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ fig.update_traces(mode='markers', marker=dict(sizemode='area',
202202
sizeref=sizeref, line_width=2))
203203

204204
fig.update_layout(
205-
title='Life Expectancy v. Per Capita GDP, 2007',
205+
title=dict(text='Life Expectancy v. Per Capita GDP, 2007'),
206206
xaxis=dict(
207-
title='GDP per capita (2000 dollars)',
207+
title=dict(text='GDP per capita (2000 dollars)'),
208208
gridcolor='white',
209209
type='log',
210210
gridwidth=2,
211211
),
212212
yaxis=dict(
213-
title='Life Expectancy (years)',
213+
title=dict(text='Life Expectancy (years)'),
214214
gridcolor='white',
215215
gridwidth=2,
216216
),

0 commit comments

Comments
 (0)