Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Finishing up Hexbin Mapbox PR #2638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 14, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
documentation for hexbin_mapbox
  • Loading branch information
RenaudLN committed Jun 11, 2020
commit 9359d457cf60f01766f2d5f08d13dfb3b3b51fdb
11 changes: 11 additions & 0 deletions doc/python/plotly-express.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,17 @@ fig = px.line_mapbox(df, lat="centroid_lat", lon="centroid_lon", color="peak_hou
fig.show()
```

```python
import plotly.express as px
import numpy as np
px.set_mapbox_access_token(open(".mapbox_token").read())
df = px.data.carshare()
fig = px.hexbin_mapbox(df, lat="centroid_lat", lon="centroid_lon", color="peak_hour",
color_continuous_scale=px.colors.cyclical.IceFire, labels={"color": "Average peak hour"},
gridsize=10, agg_func=np.mean)
fig.show()
```

```python
import plotly.express as px
df = px.data.gapminder()
Expand Down