plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

plotly.express.scatter_geo shows values provided to text argument in the hoverinfo instead of printing them on the map

Open MdoubleDash opened this issue 5 years ago • 2 comments

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()

image

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

MdoubleDash avatar Jun 18 '20 00:06 MdoubleDash

I have the same problem.

mkleinbort avatar Sep 20 '20 13:09 mkleinbort

I also have the same problem

wico-jourdan avatar Nov 23 '21 16:11 wico-jourdan

@archmoj will your recent work address this?

gvwilson avatar Aug 12 '24 15:08 gvwilson

Any news on this?

asadow avatar Oct 23 '24 15:10 asadow

@LiamConnors Could you please replicate this in a codepen?

archmoj avatar Oct 23 '24 16:10 archmoj