Skip to content

px.scatter_mapbox() breaks when attempting to plot more than 1600 coordinate points  #4352

@gregorywduke

Description

@gregorywduke

I have about 4800 coordinate points I'm trying to plot. Attempting to plot them all results in an empty white map without any points whatsoever.

fig = px.scatter_mapbox(df, lat='lat', lon='long')
fig.update_layout(autosize=False, width=950, height=1000)
fig.update_layout(mapbox_style='open-street-map')
fig.show()

When I pass only 1600 points to px.scatter_mapbox(), the map displays properly with all 1600 coordinate points.

fig = px.scatter_mapbox(df.head(1600), lat='lat', lon='long')
fig.update_layout(autosize=False, width=950, height=1000)
fig.update_layout(mapbox_style='open-street-map')
fig.show()

I've considered the possibility that there is some invisible limit to points that can be plotted without a Mapbox API token, so I created an account and got a token, but I cannot figure out how to actually use the token. The documentation is not clear how the token should be used, and I get errors no matter what I try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions