Skip to content

Commit 671c80d

Browse files
committed
add stamen example
1 parent 8e2538d commit 671c80d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/python/mapbox-layers.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,24 @@ fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
201201
fig.show()
202202
```
203203

204+
<!-- #region -->
205+
#### Stamen Watercolor using a Custom Style URL
206+
207+
Here's an example of using a custom style URL that points to the Stadia Maps service to use the `stamen_watercolor` base map.
208+
209+
```python
210+
import pandas as pd
211+
quakes = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv')
212+
213+
import plotly.graph_objects as go
214+
fig = go.Figure(go.Densitymap(lat=quakes.Latitude, lon=quakes.Longitude, z=quakes.Magnitude,
215+
radius=10))
216+
fig.update_layout(map_style="https://tiles.stadiamaps.com/styles/stamen_watercolor.json?api_key=YOUR-API-KEY", map_center_lon=180)
217+
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
218+
fig.show()
219+
```
220+
<!-- #endregion -->
221+
204222
<!-- #region -->
205223
### Mapbox
206224

0 commit comments

Comments
 (0)