Plotly.py v7.0.0 (25 Aug 2026) bundles Plotly.js 4 and removes Mapbox traces (scattermapbox, choroplethmapbox, densitymapbox, layout.mapbox, mapboxAccessToken) in favour of MapLibre *map. Notebook: px.scatter_mapbox → px.scatter_map. Also gone: old Figure Factories, Kaleido <1, Orca. Upgrade checklist. Not investment advice.
Plotly.py v7.0.0 shipped on 25 August 2026 (GitHub release). It upgrades the bundled Plotly.js from 3.6.0 to 4.0.0. The breaking map change: Mapbox traces are gone. Use MapLibre-based *map traces instead. Official guides: Changes in Version 7 and MapLibre migration.
This is an after-work “will my map notebook explode?” checklist plus one synthetic lat/lon sketch — not a Dash rewrite, not a trading dashboard, and not investment advice. The only course CTA is Introduction to Python Programming.
From Plotly.js 4 / Plotly.py 7:
| Removed | Use instead |
|---|---|
go.Scattermapbox | go.Scattermap |
go.Choroplethmapbox | go.Choroplethmap |
go.Densitymapbox | go.Densitymap |
px.scatter_mapbox | px.scatter_map |
px.line_mapbox | px.line_map |
px.choropleth_mapbox | px.choropleth_map |
px.density_mapbox | px.density_map |
layout.mapbox | layout.map |
mapbox_style (Plotly Express) | map_style |
mapboxAccessToken config | not required for Plotly-provided styles |
Mapbox traces had been deprecated in v6; v7 deletes them. Built-in style names (basic, streets, outdoors, light, dark, satellite, satellite-streets) still exist but now point at Carto / ESRI MapLibre styles, not Mapbox. Plotly-provided styles no longer need a Mapbox API key. External tile styles still work with the existing API — check your map_style URL.
Maps now auto-fit to data by default (layout.map.fitbounds and layout.geo.fitbounds default to "locations"). If you already set center/zoom, that view is unchanged. To force the old world view: fitbounds=False.
create_2d_density, create_annotated_heatmap, create_bullet, create_candlestick, create_choropleth, create_distplot, create_facet_grid, create_gantt, create_hexbin_mapbox, create_ohlc, create_scatterplotmatrix, create_violin. Use the replacements listed in the v7 migration page (e.g. go.Quiver instead of create_quiver).engine= argument is gone from fig.write_image() / fig.to_image() / pio.*. Install Kaleido ≥ 1.stream on traces, *src attributes, showLink / sendData / showEditInChartStudio. Sharing uses showSendToCloud (on by default) and a “Share chart…” modebar button.hsv(), no rgb() with 0–1 fractions, hex needs #.Nice-to-know, not tonight: go.Quiver, Sankey layout updates, culori colour parsing.
python -c "import plotly; print(plotly.__version__)"
# pip install -U "plotly==7.0.0"
# pip install -U "kaleido>=1"
| Your notebook | Tonight |
|---|---|
| No maps, no figure factories, Kaleido ≥ 1 | Usually fine — most figures render unchanged. |
px.scatter_mapbox / layout.mapbox / Mapbox token | Must rename to *map / layout.map / map_style before upgrading. |
fig.write_image(..., engine="orca") | Drop engine; install Kaleido 1.x. |
| Still on Plotly 5 Mapbox-only code | Migrate names first (they existed since 5.24), then jump to 7. |
scatter_mapbox → scatter_mapSynthetic cities only. Do not paste broker locations.
import plotly.express as px
import pandas as pd
df = pd.DataFrame({
"city": ["Montreal", "Toronto", "Vancouver"],
"lon": [-73.57, -79.38, -123.12],
"lat": [45.50, 43.65, 49.28],
})
# v6 and earlier: px.scatter_mapbox(..., mapbox_style="open-street-map")
# v7:
fig = px.scatter_map(
df, lat="lat", lon="lon", hover_name="city",
zoom=3, map_style="open-street-map",
)
# fig.update_layout(map=dict(fitbounds="locations")) # default in v7
fig.show()
Search your repo: scatter_mapbox, choropleth_mapbox, density_mapbox, mapbox_style, layout.mapbox, mapboxAccessToken, create_.
If pip and notebook kernels still fight you, use Introduction to Python Programming, then print plotly.__version__ and run the rename on synthetic points.