New to plotly, I’m trying drawing a scatter_map. For some reason, I want to cancel the country border by the code as follows:
fig = px.scatter_mapbox(
df, lat="lat", lon="lon", color="var_c", size='var_s',
custom_data=['city', 'var_c', 'var_s'],
mapbox_style="open-street-map",
center=dict(lat=34.3227, lon=108.5525),
zoom=3
)
fig.update_geos(
showcountries=False
)
But only the px.scatter_mapbox
works and coutry boundaries have not be deleted.
While I use go.Scattergeo()
, It works:
fig = go.Figure(go.Scattergeo())
fig.update_geos(
showcountries=False
)
I want to know whether update_geos conflict with px.scatter_mapbox(according to offical tutorial, they don’t conflict), and how can I fix it?
Thanks in advance.