8000 Feature/hexbin mapbox by RenaudLN · Pull Request #2559 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Feature/hexbin mapbox #2559

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 14 commits into from
Jul 14, 2020
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
0