Skip to content

Commit 09fc158

Browse files
committed
Update scattermapbox.md
1 parent 93cd690 commit 09fc158

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

doc/python/scattermapbox.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,25 +249,22 @@ fig.show()
249249

250250
*New in 5.11*
251251

252-
Display clusters of data points by setting `cluster`. Here, we enable it with `enabled=True`. Other properties available on `cluster` include `color` (for setting the color of the clusters), `size` (for setting the size of a cluster step), and `step` (for configuring how many points it takes to create a cluster or advance to the next cluster step.
253-
252+
Display clusters of data points by setting `cluster`. Here, we enable it with `enabled=True`. You can also enable it by setting other `cluster` properties. Other available properties include `color` (for setting the color of the clusters), `size` (for setting the size of a cluster step), and `step` (for configuring how many points it takes to create a cluster or advance to the next cluster step.
254253

255254
```python
256255
import plotly.express as px
257256
import pandas as pd
258257

259258
px.set_mapbox_access_token(open(".mapbox_token").read())
260-
261-
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/2011_february_us_airport_traffic.csv')
262-
259+
df = pd.read_csv(
260+
"https://raw.githubusercontent.com/plotly/datasets/master/2011_february_us_airport_traffic.csv"
261+
)
263262
fig = px.scatter_mapbox(df, lat="lat", lon="long", size="cnt", zoom=3)
264-
265263
fig.update_traces(cluster=dict(enabled=True))
266-
267264
fig.show()
265+
268266
```
269267

270268
#### Reference
271269

272270
See [function reference for `px.(scatter_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.scatter_mapbox) or https://plotly.com/python/reference/scattermapbox/ for more information and options!
273-

0 commit comments

Comments
 (0)