I am trying to label some of the points on my scatter map using plotly.express.scatter_geo and text argument. I think there's a bug that causes text to be picked up for hoverinfo instead of the labels. See the reproducible example below:
import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.scatter_geo(df, locations="iso_alpha",
color="continent", # which column to use to set the color of markers
hover_name="country", # column added to hover information
size="pop", # size of markers
projection="natural earth",
text="lifeExp")
fig.show()
I am trying to label some of the points on my scatter map using
plotly.express.scatter_geo
andtext
argument. I think there's a bug that causestext
to be picked up for hoverinfo instead of the labels. See the reproducible example below:I was expecting the values as labels for each point in reference to documentation: https://plotly.com/python-api-reference/generated/plotly.express.scatter_geo.html