Skip to content

Commit 50eb940

Browse files
committed
remove mapbox references from docs and doc build workflow
1 parent 09dc038 commit 50eb940

25 files changed

Lines changed: 44 additions & 397 deletions

.github/workflows/build-doc.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ jobs:
3838
3939
4040
- name: Build HTML docs
41-
env:
42-
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
4341
run: |
4442
cd doc
4543
source .venv/bin/activate
46-
echo "${MAPBOX_TOKEN}" > python/.mapbox_token
4744
make -kj8 || make -kj8
4845
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py
4946
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ tests/test_core/test_offline/plotly.min.js
5555
temp-plot.html
5656
.vscode
5757
doc/python/.ipynb_checkpoints
58-
doc/python/.mapbox_token
5958
doc/.ipynb_checkpoints
6059
tags
6160
doc/check-or-enforce-order.py

doc/Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ all: $(HTML_FILES) $(V3_REDIR_FILES) $(NEXT_REDIR_FILES)
2121

2222
.PRECIOUS: $(IPYNB_FILES)
2323

24-
$(IPYNB_DIR)/.mapbox_token: $(MD_DIR)/.mapbox_token
25-
@mkdir -p $(IPYNB_DIR)
26-
@echo "[symlink] .mapbox_token"
27-
@cd $(IPYNB_DIR) && ln -s ../../$<
28-
29-
$(IPYNB_FILES): $(IPYNB_DIR)/.mapbox_token
30-
3124
$(IPYNB_DIR)/%.ipynb: $(MD_DIR)/%.md
3225
@mkdir -p $(IPYNB_DIR)
3326
@echo "[jupytext] $<"

doc/README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ uv pip uninstall plotly # remove the PyPI version installed by requirement
3232
uv pip install -e .. # install from your local checkout
3333
```
3434

35-
### Mapbox token
36-
37-
Several geographic examples require a free Mapbox public token. Without it,
38-
those specific pages will fail to build.
39-
40-
1. Create an account at https://account.mapbox.com/auth/signup
41-
2. Navigate to https://account.mapbox.com/ and copy your "Default public token"
42-
3. Save it to the file `doc/python/.mapbox_token`
43-
44-
The Makefile symlinks this token into the build directory automatically.
45-
4635
## Tutorials (`python` directory)
4736

4837
Each tutorial is a markdown (`.md`) file, which can be opened in Jupyter
@@ -391,8 +380,6 @@ Check `build/failures/<page-name>` for the full error output. Common causes:
391380
- **Timeout** — the default is 600 seconds (10 minutes). If your example
392381
legitimately needs more time, discuss in an issue before increasing the
393382
timeout.
394-
- **Missing Mapbox token** — geographic examples will fail if
395-
`doc/python/.mapbox_token` does not exist.
396383

397384
### `make` fails immediately
398385

doc/apidoc/plotly.express.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ plotly's high-level API for rapid figure generation. ::
1919
scatter_polar
2020
scatter_ternary
2121
scatter_map
22-
scatter_mapbox
2322
scatter_geo
2423
line
2524
line_3d
2625
line_polar
2726
line_ternary
2827
line_map
29-
line_mapbox
3028
line_geo
3129
area
3230
bar
@@ -48,13 +46,10 @@ plotly's high-level API for rapid figure generation. ::
4846
parallel_categories
4947
choropleth
5048
choropleth_map
51-
choropleth_mapbox
5249
density_contour
5350
density_heatmap
5451
density_map
55-
density_mapbox
5652
imshow
57-
set_mapbox_access_token
5853
get_trendline_results
5954

6055

doc/apidoc/plotly.graph_objects.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ Map Traces
101101
Scattermap
102102
Choroplethmap
103103
Densitymap
104-
Scattermapbox
105-
Choroplethmapbox
106-
Densitymapbox
107104

108105
Specialized Traces
109106
-----------

doc/python/configuration-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ To delete buttons from the modebar, pass an array of strings containing the name
212212
- **3D**: `zoom3d`, `pan3d`, `orbitRotation`, `tableRotation`, `handleDrag3d`, `resetCameraDefault3d`, `resetCameraLastSave3d`, `hoverClosest3d`
213213
- **Cartesian**: `hoverClosestCartesian`, `hoverCompareCartesian`
214214
- **Geo**: `zoomInGeo`, `zoomOutGeo`, `resetGeo`, `hoverClosestGeo`
215-
- **Other**: `hoverClosestGl2d`, `hoverClosestPie`, `toggleHover`, `resetViews`, `toImage`, `sendDataToCloud`, `toggleSpikelines`, `resetViewMapbox`
215+
- **Other**: `hoverClosestGl2d`, `hoverClosestPie`, `toggleHover`, `resetViews`, `toImage`, `sendDataToCloud`, `toggleSpikelines`, `resetViewMap`
216216

217217
```python
218218
import plotly.graph_objects as go
@@ -305,7 +305,7 @@ fig.show()
305305

306306
### Double-Click Delay
307307
Sets the maximum delay between two consecutive clicks to be interpreted as a double-click in milliseconds. This is the time interval between first mousedown and second mouseup. The default timing is 300 ms (less than half a second).
308-
This setting propagates to all on-subplot double clicks (except for `geo` and `mapbox`).
308+
This setting propagates to all on-subplot double clicks (except for `geo` and `map`).
309309

310310
```python
311311
import plotly.graph_objects as go

doc/python/density-heatmaps.md

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jupyter:
3131
page_type: u-guide
3232
permalink: python/density-heatmaps/
3333
redirect_from: python/mapbox-density-heatmaps/
34-
thumbnail: thumbnail/mapbox-density.png
34+
thumbnail: thumbnail/map-density.png
3535
---
3636

3737
### Density map with `plotly.express`
@@ -67,55 +67,8 @@ fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
6767
fig.show()
6868
```
6969

70-
<!-- #region -->
71-
### Mapbox Maps
72-
73-
> Mapbox traces are deprecated and may be removed in a future version of Plotly.py.
74-
75-
The earlier examples using `px.density_map` and `go.Densitymap` use [Maplibre](https://maplibre.org/maplibre-gl-js/docs/) for rendering. These traces were introduced in Plotly.py 5.24. These trace types are now the recommended way to make tile-based density heatmaps. There are also traces that use [Mapbox](https://docs.mapbox.com): `density_mapbox` and `go.Densitymapbox`.
76-
77-
To use these trace types, in some cases you _may_ need a Mapbox account and a public [Mapbox Access Token](https://www.mapbox.com/studio). See our [Mapbox Map Layers](/python/mapbox-layers/) documentation for more information.
78-
79-
Here's one of the earlier examples rewritten to use `px.density_mapbox`.
80-
81-
```python
82-
import pandas as pd
83-
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv')
84-
85-
import plotly.express as px
86-
fig = px.density_mapbox(df, lat='Latitude', lon='Longitude', z='Magnitude', radius=10,
87-
center=dict(lat=0, lon=180), zoom=0,
88-
mapbox_style="open-street-map")
89-
fig.show()
90-
```
91-
92-
<!-- #endregion -->
93-
94-
<!-- #region -->
95-
#### Stamen Terrain base map with Mapbox (Stadia Maps token needed): density heatmap with `plotly.express`
96-
97-
Some base maps require a token. To use "stamen" base maps, you'll need a [Stadia Maps](https://www.stadiamaps.com) token, which you can provide to the `mapbox_accesstoken` parameter on `fig.update_layout`. Here, we have the token saved in a file called `.mapbox_token`, load it in to the variable `token`, and then pass it to `mapbox_accesstoken`.
98-
99-
```python
100-
import plotly.express as px
101-
import pandas as pd
102-
103-
token = open(".mapbox_token").read() # you will need your own token
104-
105-
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv')
106-
107-
fig = px.density_mapbox(df, lat='Latitude', lon='Longitude', z='Magnitude', radius=10,
108-
center=dict(lat=0, lon=180), zoom=0,
109-
map_style="stamen-terrain")
110-
fig.update_layout(mapbox_accesstoken=token)
111-
fig.show()
112-
```
113-
114-
115-
<!-- #endregion -->
11670

11771
#### Reference
11872

119-
See [function reference for `px.(density_map)`](https://plotly.com/python-api-reference/generated/plotly.express.density_mapbox) or https://plotly.com/python/reference/densitymap/ for available attribute options.
73+
See [function reference for `px.(density_map)`](https://plotly.com/python-api-reference/generated/plotly.express.density_map) or https://plotly.com/python/reference/densitymap/ for available attribute options.
12074

121-
For Mapbox-based maps, see [function reference for `px.(density_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.density_mapbox) or https://plotly.com/python/reference/densitymapbox/.

doc/python/figure-factories.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The `plotly.figure_factory` module contains dedicated functions for creating ver
4040
The following plot types can be created with Figure Factory:
4141

4242
* [Dendrograms](/python/dendrogram/)
43-
* [Hexagonal Binning Tile Map](/python/hexbin-mapbox/)
43+
* [Hexagonal Binning Tile Map](/python/hexbin-map/)
4444
* [Quiver Plots](/python/quiver-plots/)
4545
* [Streamline Plots](/python/streamline-plots/)
4646
* [Tables](/python/figure-factory-table/)
@@ -57,7 +57,7 @@ The following legacy Figure Factory functions have been replaced by Plotly Expre
5757
* `create_distplot`: use [Plotly Express](/python/plotly-express/) functions like [`px.histogram`](/python/histograms/)
5858
* `create_facet_grid`: use [Plotly Express](/python/plotly-express/) functions with the [`facet_row` and `facet_col` arguments](/python/facet-plots/)
5959
* `create_gantt`: use [`px.timeline`](/python/gantt/)
60-
* `create_hexbin_mapbox`: use [`create_hexbin_map`](/python/hexbin-mapbox/)
60+
* `create_hexbin_mapbox`: use [`create_hexbin_map`](/python/hexbin-map/)
6161
* `create_ohlc`: use [`go.Ohlc`](/python/ohlc-charts/)
6262
* `create_scatterplotmatrix`: use [`go.Splom`](/python/splom/)
6363
* `create_violin`: use [`go.Violin`](/python/violin/)

doc/python/filled-area-tile-maps.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -134,36 +134,7 @@ fig.update_layout(
134134
fig.show()
135135
```
136136

137-
<!-- #region -->
138-
### Mapbox Maps
139-
140-
> Mapbox traces are deprecated and may be removed in a future version of Plotly.py.
141-
142-
The earlier examples using `go.Scattermap` use [Maplibre](https://maplibre.org/maplibre-gl-js/docs/) for rendering. This trace was introduced in Plotly.py 5.24 and is now the recommended way to draw filled areas on tile-based maps. There is also a trace that uses [Mapbox](https://docs.mapbox.com), called `go.Scattermapbox`.
143-
144-
To use the `Scattermapbox` trace type, in some cases you _may_ need a Mapbox account and a public [Mapbox Access Token](https://www.mapbox.com/studio). See our [Mapbox Map Layers](/python/mapbox-layers/) documentation for more information.
145-
146-
Here's one of the earlier examples rewritten to use `Scattermapbox`.
147-
148-
```python
149-
import plotly.graph_objects as go
150-
151-
fig = go.Figure(go.Scattermapbox(
152-
fill = "toself",
153-
lon = [-74, -70, -70, -74], lat = [47, 47, 45, 45],
154-
marker = { 'size': 10, 'color': "orange" }))
155-
156-
fig.update_layout(
157-
mapbox = {
158-
'style': "open-street-map",
159-
'center': {'lon': -73, 'lat': 46 },
160-
'zoom': 5},
161-
showlegend = False)
162-
163-
fig.show()
164-
```
165-
<!-- #endregion -->
166137

167138
#### Reference
168139

169-
See https://plotly.com/python/reference/scattermap/ for available attribute options, or for `go.Scattermapbox`, see https://plotly.com/python/reference/scattermapbox/.
140+
See https://plotly.com/python/reference/scattermap/ for available attribute options.

0 commit comments

Comments
 (0)