Mode 'marker+text' not working properly on px.scatter_mapbox()


I’m trying to put some text next to my markers in a px.scatter_mapbox(). I’m using a mapbox_token since I read about this not working with regular maps.

What happens is that some of the labels appear and some others don’t.

Here’s my code.

fig = px.scatter_mapbox(coords_df, lat="lat", lon="lon", color='AQI',
         hover_name="Station", hover_data=['AQI'],
         text = coords_df['Station'].to_numpy(),
         color_continuous_scale=["blue", "green", "red"],
         zoom=12, height=400)

Any help will be apreciated.

This is not currently possible with scattermapbox. The only way I know to add text on a plotly-mapbox graph is to use paper-referenced annotations.

I’m sorry but what do you mean by not currently available? I’m getting some text next to the markers right now.

This is working now it was a zoom issue, some labels disappear when too zoomed out.